SmsDescribeFolder

The SmsDescribeFolder function retrieves information about the properties of a specific type of container or folder. SmsDescribeFolder retrieves a pointer to a pointer to a FOLDER_INFO structure that contains information about the container or folder.

SMS_STATUS SmsDescribeFolder(
  BASETYPE tObjectity,  // Type of object whose information you want 
                        // to retrieve.
  DWORD dwTag,          // Tag for the container or folder type.
  FOLDER_INFO **ppFInfo // Pointer to pointer to FOLDER_INFO 
                        // structure.
);
 

Parameters

tObjectity
Specifies the type of object whose information you want to retrieve. The object can be a container or a folder. See BASETYPE.
dwTag
Specifies the container or folder type. See Container Types or Folder Types.

Note that SmsDescribeFolder is not applicable to F_GROUP folders because the set of attributes for a group is dependent on the instance of the group itself within a specific machine folder. If F_GROUP is specified for SmsDescribeFolder, a status code of SMS_INVALID_FOLDER_ID is returned.

ppFInfo
Points to a pointer to a FOLDER_INFO structure that contains the information about the specified container or folder type.

Return Values

The SmsDescribeFolder 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:

SMS_INVALID_CONTAINER_ID
The specified container type tag is an unknown container type.
SMS_INVALID_FOLDER_ID
The specified folder type tag is an unknown folder type.

If an F_GROUP folder is specified for SmsDescribeFolder, this status code is returned. The set of attributes for an F_GROUP folder is dependent on the instance of the group itself within a specific machine folder—there is no generic set of attributes for all F_GROUP folders.

Remarks

The FOLDER_INFO structure resides in the address space of the SMS API engine. This structure should not be modified or deallocated.

The FOLDER_INFO structure contains information that describes the properties of a type of container or folder. The container functions and folder functions are used to access specific containers and folders that represent objects in the SMS site database. In short, the FOLDER_INFO structure is used to get the general properties of a certain kind of container or folder, and the container and folder functions are used to access actual containers and folders.

Note that the SmsDescribeFolder function retrieves the information for only the specified folder or container type. The SmsEnumContainers function retrieves an array of all container types. The SmsEnumFolders function retrieves an array of all folder types.

Example

// Use SmsDescribeFolder to get information about 
// a Run Command On Workstations job folder and its scalars.

FOLDER_INFO *pFInfo;
stat = SmsDescribeFolder( T_FOLDER, F_INSTALLJOB, &pFInfo );
 

See Also

FOLDER_INFO, SmsEnumContainers, SmsEnumFolders