The SmsEnumObjectTypes function returns a list of first-class objects that are known to the API.
SMS_STATUS SmsEnumObjectTypes(
HANDLE hConnection, // Handle to a connection that has been
// established via SmsDataSourceConnect.
SMSBUFF *pObjects, // Pointer to an array of first-class objects
// known to the system.
DWORD *pCtObjects // On entry, points to the size of the
// pObjects array; on exit, points to the actual
// number of first-class objects known to the
// system.
);
The SmsEnumObjectTypes function returns a status code SMS_STATUS. If successful, the function returns a status of SMS_OK. Otherwise, it returns one of the following manifest constants:
A first-class object is one that is known directly to the API and does not require any additional information. For example, the system knows directly about architectures and platforms, but cannot know about attributes without first knowing about an architecture and a groupclass.
To get the correct size for the pObjects array, call the SmsEnumObjectTypes function with pObjects set to NULL or with pCtObjects set to zero. SmsEnumObjectTypes will assign the count of the first-class objects to pCtObjects and return a status of SMS_MORE_DATA. After getting the correct value for pCtObjects, call the SmsEnumObjectTypes function again using the correct value for pCtObjects and a pObjects array with a size that matches the count specified by pCtObjects.
If the entry value of pCtObjects is less than the number of first-class objects known to the system, the function does not copy any information to the pObjects array and returns a status of SMS_MORE_DATA.
If the entry value of pCtObjects is greater than the number of first-class objects known to the system, the function writes all first-class objects to the pObjects array and returns a status of SMS_OK.
SmsDataSourceConnect, SmsEnumObjects