Determines whether the specified file is a valid data file for the filter DLL. If so, the CMA_FindFirst Company function retrieves the company name and data path for the first company identified in the file and copies the name and path to the given CMA_CTRLINFO structure.
Syntax
BOOL CMA_FindFirstCompany(CHAR szFilename[256],
CMA_CTRLINFO& CtrlInfo);
szFilename A null-terminated string that contains the name of the data file in which you want to search for the name and data path of the first company in the returned list.
CtrlInfo The address of the CMA_CTRLINFO structure into which the filter DLL copies the company name and data path. The CMA_FindFirstCompany function fills in only the szCompanyName and szDataPath members of the CMA_CTRLINFO structure. The CMA_LoadCompany function uses szDataPath to open the company data, and then it fills in the remaining members of the structure.
Return Values
False if the specified file is invalid or if the szCompanyName member of the CMA_CTRLINFO structure identifies the first (or only) company in the file. True if process is successful.
Remarks
The Import Wizard calls this function for each file that matches the szSearchFilename member of the CMA_PACKAGE structure, as specified by the filter DLL's CMA_LoadPackage function.
If the szFilename file identifies multiple companies, the CMA_FindNextCompany function provides the information for the rest of the companies. In this case, CMA_FindFirstCompany just opens the data file and calls CMA_FindNextCompany.
See Also