The SmsPopulate function can retrieve folders in asynchronous mode from containers that contain machine folders (site containers, site group containers, machine containers, and machine group containers). Using asynchronous mode, your application goes immediately to the next line of code (after the SmsPopulate call) while the SMS API engine retrieves all folders that satisfy the filter criteria. You can set additional flags that specify that the SMS API engine should set an event handle or post a message to a window each time a specified number of objects is retrieved and when the retrieval is completed.
Although the SmsPopulate function applies to containers, the asynchronous behavior goes into effect only when retrieving machine folders from their parent containers or folders. For machine containers, the asynchronous behavior is in effect when SmsPopulate is called, because machine folders are the top-level folder in the container.
However, the machine folders in a site container are lower-level folders; they are contained within the domain folders within site folders. When your application uses asynchronous population on a site container, the asynchronous retrieval takes effect when it accesses the folder containing the machine folders—the domain folder. The site folders and the domain folders are not retrieved asynchronously.
When your application uses asynchronous mode to retrieve machine folders within a site container, you must consider the following issues:
For example, if a site folder contains four domain folders and your application calls one of the listed functions (such as SmsGetFolderCount) for only one domain folder, machine folder retrieval will be triggered only for that one domain.
To avoid problems, your application should use one of the following methods to retrieve machine folders from multiple domain folders: