cwbSV_SetMessageComponent
Use the cwbSV_SetMessageComponent API with this product.
Purpose
This function allows setting of a unique component identifier in the message handle that is provided. Along with setting the product ID (see cwbSV_SetMessageProduct), this call should be used to distinguish your message entries from other product's entries in the history log.
Syntax
unsigned int CWB_ENTRY cwbSV_SetMessageComponent(
cwbSV_MessageTextHandle messageTextHandle,
char *componentID);
Parameters
- cwbSV_MessageTextHandle messageTextHandle - input
- Handle that was returned by a previous call to cwbSV_CreateMessageTextHandle().
- char * componentID - input
- Points to a null-terminated string that contains a component identifier to be used on this message entry. NOTE: A maximum of CWBSV_MAX_COMP_ID characters will be logged for the component ID. Larger strings will be truncated.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_HANDLE
- Unusable handle passed in on request.
Usage
This value should be set before calling the corresponding log function, "cwbSV_LogMessageData()". The suggested hierarchy is that you would define a product ID with one or many components that are defined under it.