SmsLinkFolder

The SmsLinkFolder function links the specified folder to its parent (the parent is the container or folder within which the specified folder was created).

SMS_STATUS SmsLinkFolder(
  HANDLE hFolder  // Handle to folder to be linked to its parent.
);
 

Parameters

hFolder
Specifies the handle to the folder to link.

Return Values

The SmsLinkFolder 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_DUPLICATE_FOLDER
The specified folder is newly created and a folder with the same name already exists in the SMS database.
SMS_INVALID_HANDLE
The specified folder handle is not a valid folder handle.
SMS_INVALID_PARAMETER
The specified folder contains one or more scalars that have not been set properly.
SMS_FOLDER_LINKED
The specified folder has already been linked to the parent.
SMS_PARENT_NOT_FOUND
The handle to the parent folder or container that was used to create the current folder has already been closed and it is not possible to insert the child into it.

Remarks

SmsLinkFolder inserts the specified folder at the beginning of the parent's folder list.

Note that linking a folder associates the folder to its parent only within the application's memory—the folder is not written to the site database. A new folder is not added to the site database until your application uses the SmsCommitFolder function to write the folder to the database.

See Also

SmsCommitFolder, SmsCreateFolder, SmsUnlinkFolder