NWSMTSScanNextDataSet

Continues the scan started by NWSMTSScanDataSetBegin and returns the next data set that meets the scanning criteria.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSScanNextDataSet (
     UINT32                        connection, 
     UINT32                       *sequence, 
     NWSM_SCAN_INFORMATION   **scanInformation, 
     NWSM_DATA_SET_NAME_LIST **dataSetNames);
  

Parameters

connection

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

sequence

(IN/OUT) Points to the sequence value from NWSMTSScanDataSetBegin or NWSMTSScanNextDataSet.

scanInformation

(OUT) Points to the scan information for one data set (optional).

dataSetNames

(OUT) Points to the list that contains a data set's name as it appears under every supported name space.

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

0xFFFBFFFB

NWSMUT_OUT_OF_MEMORY

0xFFFBFFFD

NWSMUT_INVALID_PARAMETER

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFC9

NWSMTS_OUT_OF_MEMORY

0xFFFDFFC4

NWSMTS_SCAN_ERROR

0xFFFDFFD1

NWSMTS_NO_MORE_DATA_SETS

0xFFFDFFD8

NWSMTS_INVALID_SEQUENCE_NUMBER

0xFFFDFFDC

NWSMTS_INVALID_PATH

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFDFFEB

NWSMTS_GET_NAME_SPACE_ENTRY_ERR

0xFFFDFFF3

NWSMTS_DATA_SET_IS_OPEN

0xFFFEFFFE

NWSMDR_INVALID_PARAMETER

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

Before NWSMTSScanNextDataSet is called, NWSMTSScanDataSetBegin must be called to initiate a scan.

Call NWSMTSScanNextDataSet repeatedly until all data sets are found or an error occurs.

The engine should copy the information returned by scanInformation and dataSetNames since the buffer is reused when NWSMTSScanNextDataSet is called again.

The engine must not call NWSMTSScanNextDataSet after it returns NWSMTS_NO_MORE_DATA_SETS, unless sequence from a different NWSMTSScanDataSetBegin or NWSMTSScanNextDataSet function is passed. Otherwise, NWSMTS_INVALID_SEQUENCE_NUMBER will be returned.

If there are no more data sets to scan, NWSMTSScanNextDataSet returns NWSMTS_NO_MORE_DATA_SETS, sets sequence to zero, and frees dataSetNames and scanInformation.

If NWSMTSScanNextDataSet does not return an error other than cluster error(valid only for cluster enabled backups), the engine must call NWSMTSScanDataSetEnd to end the scan.

See Also

NWSMTSScanDataSetBegin, NWSMTSScanDataSetEnd

Example

See the example for NWSMTSScanDataSetBegin.