NWSMGetDataSetInfo

Returns the data set information.

Syntax

  #include <smsutapi.h> 
   
  CCODE NWSMGetDataSetInfo ( 
     BUFFERPTR  *buffer, 
     UINT32     *bufferSize, 
     NWSM_RECORD_HEADER_INFO 
                *recordHeaderInfo);
  

Parameters

buffer

(IN/OUT) Points to the beginning of the data set information section of buffer on input. Points to the section following the data set information on ouput.

bufferSize

(IN/OUT) Points to the amount of data left to read in buffer on input. Points to the amount of data in buffer minus the amount of data just read from buffer on output.

recordHeaderInfo

(OUT) Points to the data set information and scan information.

Return Values

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

0x00000000

Successful

0xFFFBFFFB

NWSMUT_OUT_OF_MEMORY

0xFFFBFFF0

NWSMUT_BUFFER_UNDERFLOW: A field cannot fit into buffer.

Remarks

Call NWSMGetRecordHeaderOnly before calling NWSMGetDataSetInfo.

NWSMGetDataSetInfo extracts the data set and scan information from a buffer and places it into recordHeaderInfo.

If the data set information spans buffer, NWSMGetDataSetInfo saves the information to an internal buffer and sets recordHeaderInfo.dataSetInfoRetrieved to DATA_SET_INFO_SPANNED. When the function returns, get the next buffer, call NWSMGetRecordHeaderOnly to get the Data Set Subheader, and call NWSMGetDataSetInfo to get the rest of the data. Continue this process until recordHeaderInfo.dataSetInfoRetrieved is DATA_SET_INFO_COMPLETE.

recordHeaderInfo.recordSize is decremented to reflect the amount of data transferred from the buffer.

If the data set information spans the buffer, buffer points to the end of the buffer on return.

recordHeaderInfo.dataSetName and recordHeaderInfo.scanInformation will be set to NULL or to a valid structure. The memory used by the data set name or scan information will be resized if there is not enough space.

recordHeaderInfo.recordSize is the size of the record minus the amount of data put into scanInformation and dataSetName.

recordHeaderInfo.headerSize returns the size of the data set header or data set subheader.

The following recordHeaderInfo fields are not used by NWSMGetDataSetInfo:

  archiveDateAndTime 
  addressOfRecordSize 
  addressForCRC 
  crcBegin 
  crcLength
  

See Also

NWSMGetRecordHeaderOnly