Receiving each object to restore or retrieve
After the dsmBeginGetData call is sent, you can perform a procedure to receive each object that is sent from the server.
About this task
The DSM_RC_MORE_DATA return code means that a buffer was returned and that you should call dsmGetData again. Check the DataBlk.numBytes for the actual number of returned bytes.
When you obtain all data for an object, you must send a dsmEndGetObj call. If more objects will be received, send dsmGetObj again.
If you want to stop the process, for example, to discard any remaining data in the restore stream for all objects that are not yet received, send the dsmEndGetData call. This call flushes the data from the server to the client. However, using this method might take time to complete. If you want to end a restore operation, use dsmTerminate to close the session.
Procedure
- Send the dsmGetObj call to identify the object that you requested from the data stream and to obtain the first block of data that is associated with the object.
- Send more dsmGetData calls, as necessary to obtain the remaining object data.