dsmRequestBuffer
The dsmRequestBuffer function returns a buffer to IBM® Storage Protect. The application calls dsmRequestBuffer after a dsmGetDataEx was called and the application has moved all the data out of the buffer and is ready to release it.
dsmReleaseBuffer requires that dsmInitEx was called with the UseTsmBuffers set to btrue and a non-zero value was provided for numTsmBuffers. dsmReleaseBuffer should also be called if the application is about to call dsmTerminate and it still holds IBM Storage Protect buffers.
Syntax
dsInt16_t dsmRequestBuffer (getBufferIn_t *dsmRequestBufferInP,
getBufferOut_t *dsmRequestBufferOutP) ;
Parameters
- getBufferIn_t * dsmRequestBufferInP (I)
- This structure contains the following input parameter:
- dsUint32_t dsmHandle
- The handle that identifies the session and associates it with a previous dsmInitEx call.
- getBufferOut_t *dsmRequestBufferOut P (0)
- This structure contains the output parameters.
- dsUint8_t tsmBufferHandle(0)
- The handle that identifies this buffer.
- char *dataPtr(0)
- The address to which application is written.
- dsUint32_t *bufferLen(0)
- Maximum number of bytes that can be written to this buffer.
Return codes
The return code numbers are provided in parentheses ( ).
| Return code | Explanation |
|---|---|
| DSM_RC_BAD_CALL_SEQUENCE (33) | The call was not issued in the proper state. |
| DSM_RC_SENDDATA_WITH_ZERO_SIZE (34) | If the object being sent is 0 length, no calls to dsmReleaseBuffer are allowed. |
| DSM_RC_BUFF_ARRAY_ERROR (121) | A valid buffer could not be obtained. |