get_enumerated_string_array_c
status.i4.v = get_enumerated_string_array_c(num_values.i4.r,
strings.i1pa.r,
entry_length.i4.r
[,enumerated_id.i4.v]
[,values.i4p.r]
[,user_data_typ.i4.r]
[,help_info.sp.r])
This routine returns the text strings associated with any
enumerated data type used by the 'numeric_to_ascii(_c)',
'ascii_to_numeric(_c)', '(window_)display_value(_c)', and
'(window_)input_value(_c)' routines. The values for these
strings must have been set by a prior call to
'set_enumerated_string_array_c'. Since the memory to hold these
strings is allocated by this routine, the calling program should
free this memory when it is done using the strings. If any of the
returned parameters are not desired, a value of NULL can be passed
for the corresponding argument.
num_values returned number of enumerated entries
strings returned enumerated strings
entry_length returned number of characters per enumerated text entry
[enumerated_id] identification number returned from prior call
to 'set_enumerated_string_array_c' (default is 0)
[values] returned array of enumerated numeric values
(A value of NULL can be passed for this argument,
if no values are desired.)
(default is NULL)
[user_data_typ] user requested data type
(default is NULL)
[help_info] returned entry by entry help callback information
(pointer to an array of HELP_CALLBACK_DATA structures)
(A value of NULL can be passed for this argument,
if no context sensitive entry help is desired.)
(default is NULL)
This function returns ACNET status values as follows:
CBS_OK success
CBS_MEMFAIL dynamic memory allocation failure
CBS_INVARG invalid enumerated ID passed
This function requires the following include files:
cnsparam_h, cns_data_structs_h, cbslib_h, acnet_errors_h
Related functions:
set_enumerated_string_array_c, get_enumerated_strings,
set_enumerated_strings_c, modify_enumerated_strings_c,
ascii_to_numeric(_c), numeric_to_ascii(_c), get_logical_strings,
set_logical_strings, create_user_data_type_c, get_bit_mask_strings_c,
set_bit_mask_strings_c, window_display_value(_c),
window_input_value(_c), winput(_c)
C/C++ usage:
char **strings;
int status;
int num_values;
int entry_length;
int enumerated_id = 0;
int user_data_type;
int *values;
HELP_CALLBACK_DATA *help_info;
status = get_enumerated_string_array_c(&num_values,&strings,
&entry_length,enumerated_id,
&values,&user_data_type,
&help_info);