cwbNL_FindFirstLang
Use the cwbNL_FindFirstLang command.
Purpose
Returns the first available language.
Syntax
unsigned int CWB_ENTRY cwbNL_FindFirstLang(
char *mriBasePath,
char *resultPtr,
unsigned short resultLen,
unsigned short *requiredLen,
unsigned long *searchHandle,
cwbSV_ErrHandle errorHandle);
Parameters
- char * mriBasePath - input
- Pointer to the mriBasePath, for example C:\Program Files\IBM\ClientAccess. If NULL, the mriBasePath of the product is used.
- char * resultPtr - output
- Pointer to the buffer to contain the result.
- unsigned short resultLen - input
- Length of the result buffer. Recommended size is CWBNL_MAX_LANG_SIZE.
- unsigned short * requiredLen - output
- Actual length of the result. If requiredLen > resultLen, the return value will be CWB_BUFFER_OVERFLOW.
- unsigned long * searchHandle - output
- Search handle to be passed on subsequent calls to cwbNL_FindNextLang.
- cwbSV_ErrHandle errorHandle - input
- Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle() API The messages may be retrieved through the cwbSV_GetErrText() API. If the parameter is set to zero, no messages will be retrievable.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_HANDLE
- Invalid handle.
- CWB_INVALID_POINTER
- NULL passed on output parameter.
- CWB_FILE_NOT_FOUND
- File not found.
- CWB_PATH_NOT_FOUND
- Path not found.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory.
- CWB_BUFFER_OVERFLOW
- Output buffer too small, data truncated.
Usage
The result buffer will contain a language.