SmsDupFolder

The SmsDupFolder function copies a folder from one location to another in the container/folder hierarchy. The new location of the folder must be a folder or container in which folder duplication is valid.

SMS_STATUS SmsDupFolder(
  HANDLE hParent,      // Handle to parent folder in which the new 
                       // folder will be inserted.
  HANDLE hFolder,      // Handle to the folder being duplicated.
  HANDLE *phNewFolder  // Pointer to new folder handle returned upon 
                       // successful completion.
);
 

Parameters

hParent

Specifies the handle to the parent folder in which the new folder will be inserted.

hFolder
Specifies the handle to the folder being duplicated.
*phNewFolder

Upon successful completion, receives a pointer to the new folder handle.

Return Values

The SmsDupFolder 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_NO_CREATE
The specified parent handle is not valid for this type of folder.
SMS_FOLDER_ALREADY_DELETED
The folder being duplicated has been deleted.

Remarks

SmsDupFolder is currently only valid for machine folders and can be used to populate machine group folders with existing machine folders.

A new folder created by SmsDupFolder is not linked to its parent folder. Your application must use the SmsLinkFolder function to link the new folder to its parent.

Linking associates the new folder to its parent within your application's memory—the folder is not written to the site database. Your application must use the SmsCommitFolder function to write the new folder to the database.

See Also

SmsCreateFolder, SmsDescribeFolder, SmsLinkFolder, SmsCommitFolder