cwbDQ_SetDataAddr

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 not copy the data.

Syntax

 
unsigned int CWB_ENTRY cwbDQ_SetDataAddr(
                             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

This function is better for large amounts of data, or if you want to manage memory in your application. Data will not be copied so performance will be improved.