Verifying the Data File and Retrieving the Company Name

The Import Wizard begins the filter process by searching for files with filename extensions that match the value of the szSearchFileName member of CMA_PACKAGE. This search is performed on the user's local hard drives and any network locations as specified by the user (by using UNC drive names). If the Import Wizard finds a data file that has this filename extension, the Import Wizard calls the CMA_FindFirstCompany function. This function verifies that the data file is valid, and it provides the name of the first (or only) company associated with the file.

If multiple companies are associated with a single file, the CMA_FindFirstCompany function should return True, in which case the Import Wizard calls CMA_FindNextCompany repeatedly until it returns False, indicating that all of the associated company names have been provided. After CMA_FindNextCompany returns False, the Import Wizard calls the CMA_FindClose function, giving the import filter the opportunity to free resources used during the company name retrieval process. For more information on how to handle multiple companies contained in a single data file, see "Frequently Asked Questions" later in this document.

The CMA_FindFirstCompany and CMA_FindNextCompany functions receive the address of a CMA_CTRLINFO structure. These functions should fill in the szDataPath and szCompanyName members, but no others. The remaining structure members are filled in by the CMA_LoadCompany function, which is described in the following section.

Note   The values returned in szCompanyName will be the company names from which the user chooses when determining which data set to import in SBCM/SBFM.