Sets import parameters that tell the Import Wizard how to call the remaining functions in the filter DLL, and how to process the accounting system data for the specified company. To set the import parameters, the function fills the specified structures with information from the company data file identified by the szDataPath member of the CMA_CTRLINFO structure.
Syntax
BOOL CMA_LoadCompany(CMA_CTRLINFO& CtrlInfo,
CMA_ACCTPART& AcctPart,
CMA_JOURNALENTRY& Entry);
CtrlInfo The address of the CMA_CTRLINFO structure whose szDataPath member specifies the data path of the company data file. The szDataPath and szCompanyName members were filled by a previous call to the CMA_FindFirstCompany or CMA_FindFirstCompany function. The CMA_LoadCompany function must fill in the remaining members by using information from the data file identified by szDataPath.
AcctPart The address of the CMA_ACCTPART structure the filter DLL fills with information that defines the chart of accounts used for the specified company, including optional rollups on account parts. The Import Wizard uses this information to call the CMA_LoadAcctPartCode function in to load accounting data.
Entry The address of the CMA_JOURNALENTRY structure. The CMA_LoadCompany function fills in only the lCount member, which represents the number of journal entries to be presented to the filter. The lCount member is used by SBCM to generate the progress display for the user during the import process.
Return Values
True if successful; False if an error occurs.
Remarks
The Import Wizard calls the CMA_LoadCompany function once for each company retrieved by the CMA_FindFirstCompany and CMA_FindNextCompany functions.
See Also
CMA_ACCTPART, CMA_CTRLINFO, CMA_FindFirstCompany, CMA_FindNextCompany, CMA_JOURNALENTRY