NWSMTSCloseDataSet

Closes a data set opened by NWSMTSOpenDataSetForBackup or NWSMTSOpenDataSetForRestore.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSCloseDataSet (
     UINT32   connection, 
     UINT32  *dataSetHandle);
  

Parameters

connection

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

dataSetHandle

(IN/OUT) Points to the address of the data set handle returned by NWSMTSOpenDataSetForBackup or NWSMTSOpenDataSetForRestore.

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

0xFFFDFFAF

NWSMTS_CLUSTER_TARGET_DOES_NOT_EXIST

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFE5

NWSMTS_INVALID_DATA_SET_HANDLE

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFEFFFE

NWSMDR_INVALID_PARAMETER

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

Upon return, NWSMTSCloseDataSet sets dataSetHandle to zero. If parent handles are used and the parent's subordinates are being restored, the engine should not call NWSMTSCloseDataSet until all subordinates are restored.

NWSMTSCloseDataSet restores all of the data set's original attributes to what they were before the data set was opened for backup (except its archive information). To set the data set's archive status, the engine should call NWSMTSSetArchiveStatus before closing the data set.

Between the time NWSMTSOpenDataSetForBackup and NWSMTSCloseDataSet are called, the TSA ensures that the data set's attributes are not altered.

See Also

NWSMTSOpenDataSetForBackup, NWSMTSOpenDataSetForRestore, NWSMTSSetArchiveStatus

Example

See NWSMTSOpenDataSetForRestore for an example.