NWSMTSRenameDataSet

Renames an existing child data set on the Target Service.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSRenameDataSet (
     UINT32   connection, 
     UINT32   sequence, 
     UINT32   nameSpaceType, 
     STRING   newDataSetName);
  

Parameters

connection

(IN) Specifies the connection information returned by NWSMTSConnectToTargetService or NWSMTSConnectToTargetServicEx.

sequence

(IN) Specifies the sequence value returned by NWSMTSScanDataSetBegin or NWSMTSScanNextDataSet.

nameSpaceType

(IN) Specifies the name space type of newDataSetName (see nameSpaceType Values).

newDataSetName

(IN) Specifies the data set’s new name (cannot be NULL).

Return Values

See Section 9.3, Target Service Return Values for more information.

The following table lists the return values associated with the function.

0x00000000

Successful

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFD8

NWSMTS_INVALID_SEQUENCE_NUMBER

0xFFFDFFDD

NWSMTS_INVALID_PARAMETER

0xFFFDFFEB

NWSMTS_GET_NAME_SPACE_ENTRY_ERR

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFEFFFE

NWSMDR_INVALID_PARAMETER

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

Before NWSMTSRenameDataSet is called, NWSMTSScanDataSetBegin or NWSMTSScanNextDataSet must be called to return a valid sequence number.

NWSMTSRenameDataSet cannot relocate the data set to another directory or logical location. The engine can only move data sets during the restore session (see NWSMTSOpenDataSetForRestore).

NWSMTSRenameDataSet may not apply to all Target Services because some services may not have a file system or the ability to rename a data set.

To determine if a TSA supports the ability to rename data sets, call NWSMTSGetUnsupportedOptions.

newDataSetName can contain any path information. Do not pass a NULL pointer.

nameSpaceType can be retrieved from the NWSM_DATA_SET_NAME_LIST or NWSM_SCAN_INFORMATION structure returned by NWSMTSScanDataSetBegin or NWSMTSScanNextDataSet.

See Also

NWSMTSScanDataSetBegin, NWSMTSScanNextDataSet