Reads a data set on the Target Service, formats the data according to SIDF, and returns it in a buffer.
#include <smstsapi.h> CCODE NWSMTSReadDataSet ( UINT32 connection, UINT32 dataSetHandle, UINT32 bytesToRead, UINT32 *bytesRead, BUFFERPTR buffer);
(IN) Specifies the connection information returned by NWSMTSConnectToTargetService or NWSMTSConnectToTargetServiceEx.
(IN) Specifies the data set handle returned by NWSMTSOpenDataSetForBackup.
(IN) Specifies the amount of free space in buffer.
(OUT) Points to the number of bytes read into buffer.
(OUT) Points to the buffer to contain the data (must be at least bytesToRead bytes large).
See Section 9.3, Target Service Return Values for more information.
The following table lists the return values associated with the function.
Before NWSMTSReadDataSet is called, NWSMTSScanDataSetBegin must be called to initiate the scan and NWSMTSOpenDataSetForBackup must be called to open the data set.
The data returned in buffer is the data mentioned in Standard ECMA-208. The engine formats the scan information and data set names (both are jointly known as data set information under SIDF) and places the result and data into a transfer buffer. Call NWSMSetNewRecordHeader and NWSMUpdateRecordHeader to put the information into the transfer buffer.
If buffer cannot contain all of the data, NWSMTSReadDataSet must be called repeatedly to retrieve all the data. bytesRead and bytesToRead indicates if all the data has been read. If bytesRead is equal to bytesToRead, there is more data to read.
See the example for NWSMTSScanDataSetBegin.