cwbDQ_SetData
Use the cwbDQ_SetData command.
Purpose
Set the data and data length attributes of the data object. The default is to have no data with zero length. This function will make a copy of the data.
Syntax
unsigned int CWB_ENTRY cwbDQ_SetData(
cwbDQ_Data data,
unsigned char *dataBuffer,
unsigned long dataLength);
Parameters
- cwbDQ_Data data - input
- Handle of the data object that was returned by a previous call to cwbDQ_CreateData.
- unsigned char * dataBuffer - input
- Pointer to the data. The data may contain embedded NULLS, so it is not an ASCIIZ string.
- unsigned long dataLength - input
- Length of the data in bytes.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_POINTER
- Bad or null pointer.
- CWBDQ_INVALID_DATA_HANDLE
- Invalid data handle.
- CWBDQ_BAD_DATA_LENGTH
- Length of data is not correct.
Usage
Use this function if you want to write a small amount of data or you do not want to manage the memory for the data in your application. Data will be copied and this may affect your application's performance.