cwbDT_ASCIIToHex
Use the cwbDT_ASCIIToHex command.
Purpose
Translates data from ASCII (hex representation) to binary. One byte is stored in the target for each two bytes in the source.
Unicode version
cwbDT_WideToHex
Syntax
unsigned int CWB_ENTRY cwbDT_ASCIIToHex(
char *target,
char *source,
unsigned long length);
Parameters
- char * target - output
- Pointer to the target data.
- char * source - input
- Pointer to the source (ASCII hex) data.
- unsigned long length - input
- Number of bytes of source data to translate/2.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful Completion.
- CWB_INVALID_POINTER
- NULL pointer was passed by caller.
- other
- Offset of the first untranslated character plus one.
Usage
For 'length' bytes of source data 'length'/2 bytes of target data will be stored. The caller must make sure that there is adequate space to hold the target information.