SmsUnlinkFolder

The SmsUnlinkFolder function unlinks the specified folder from its parent (the parent is the container or folder within which the specified folder was created).

SMS_STATUS SmsUnlinkFolder(
  HANDLE hFolder  // Handle to folder to unlink from its parent.
);
 

Parameters

hFolder
Specifies the handle to the folder to unlink.

Return Values

The SmsUnlinkFolder 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_HANDLE
The specified folder handle is not a valid folder handle.
SMS_FOLDER_ALREADY_DELETED
An action was attempted on a folder that has already been deleted.
SMS_PARENT_NOT_FOUND
The handle to the parent folder or container has already been closed and it is not possible to remove the child folder from it.

Remarks

SmsUnlinkFolder removes the specified folder from the parent's folder list within your application's memory.

An unlinked folder is not deleted from the site database until your application uses the SmsCommitFolder function to remove the folder from the database.

Important After your application deletes a folder from the site database by using the SmsCommitFolder function, the handle for the deleted folder can only be used for closing the folder with the SmsCloseFolder function.

See Also

SmsCommitFolder, SmsLinkFolder