cwbRC_GetParm

Purpose

Retrieve the parameter identified by the index. The index will range from 0 to the total number of parameters - 1. This number can be obtained by calling the cwbRC_GetParmCount API.

Syntax

 
unsigned int CWB_ENTRY cwbRC_GetParm(
                             cwbRC_PgmHandle     program,
                             unsigned short      index,
                             unsigned short     *type,
                             unsigned long      *length,
                             unsigned char     **parameter);

Parameters

cwbRC_PgmHandle handle - input
Handle that was returned by a previous call to the cwbRC_CreatePgm API. It identifies the program object.
unsigned short index - input
The number of the specific parameter in this program that should be retrieved. This index is zero-based.
unsigned short * type - output
Pointer to the type of parameter this is. The value will be one of the defined parameter types:
  • CWBRC_INPUT
  • CWBRC_OUTPUT
  • CWBRC_INOUT
unsigned long * length - input
Pointer to the length of the parameter.
unsigned char * * parameter - output
Pointer to a buffer that will contain the address of the actual parameter.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_POINTER
Bad or NULL pointer.
CWBRC_INVALID_PROGRAM
Invalid program handle.
CWBRC_INDEX_RANGE_ERROR
Index is out of range.

Usage

None