Get a valid ASCII choice value from a driver.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_choice_get_ascii( HISISDRV hDriver, AT_MODE nTag, WORD wIndex, LPSTR lpszValue ); |
Name | Type | Description |
---|---|---|
hDriver | HISISDRV | The handle to the driver. |
nTag | AT_MODE | The tag for which a valid ASCII value is being requested. |
wIndex | WORD | An index to a particular element of the array of valid tag values. |
lpszValue | LPSTR | A pointer to a buffer that will contain the result of IG_ISIS_choice_get_ascii. |
Error count.
This function does not process image pixels.
Copy Code
|
|
---|---|
WORD wCount, i; char lpcString[MAXLEN];IG_ISIS_choice_get_count(hDriver, IG_ISIS_TAG_PAGESIZE, &wCount); for (i = 0; i < nCount; i++) { /* add string to list */IG_ISIS_choice_get_ascii_len(hDriver, IG_ISIS_TAG_PAGESIZE, i, &wLength); if (wLength <= maxlen) {IG_ISIS_choice_get_ascii(hDriver, IG_ISIS_TAG_PAGESIZE, i, lpcString2); elsestrcpy(lpcString2, "too long to fit in window"); |
The IG_ISIS_choice_get_ascii function fills in lpszValue with the string referenced by wIndex from tag nTag.
This function must be used only for tags which have a type of IG_ISIS_TAG_TYPE_STRING. Use the IG_ISIS_tag_get_type function to determine the type of a tag.
wIndex must reference the actual number of legal values defined for a given tag. The IG_ISIS_choice_get_count function can be used to determine the total number of legal values for a tag. wIndex must be at least 0 and at most the value returned by IG_ISIS_choice_get_count - 1. The constants IG_ISIS_CHOICE_LOW, IG_ISIS_CHOICE_HIGH, and IG_ISIS_CHOICE_STEP are not valid values for wIndex, since RANGE is an invalid branch type for ASCII values.
To determine the required size of lpszValue, use the IG_ISIS_choice_get_ascii_len function. Note that IG_ISIS_choice_get_ascii_len may return a different value for each member of an array of valid values referenced by wIndex.