LIsis::GetTagASCII
#include "ltwrappr.h"
virtual L_INT LIsis::GetTagASCII(uTag, pszValue, puSize, bDefault)
L_UINT uTag; |
/* ASCII tag */ |
L_CHAR *pszValue; |
/* character string */ |
L_UINT32 *puSize; |
/* size of the string */ |
L_BOOL bDefault; |
/* flag */ |
Gets the current or default value for an ISIS Scanner Driver ASCII Tag. This function is available in the Document/Medical Toolkits.
Parameter |
Description |
|
uTag |
Value indicating the tag for which to get the current or default value. For a list of possible tags, refer to ISIS ASCII tags |
|
pszValue |
Character string to be updated with the current or default tag value. |
|
puSize |
Pointer to a variable that contains the size of the string. If pszValue is NULL, then puSize will be updated with the required size of the string for the specified tag value. |
|
bDefault |
Flag that indicates whether to get the default or current value. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
Get the scanner's default value for the specified tag. |
|
FALSE |
Get the scanner's current value for the specified tag. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Set bDefault to TRUE to query the driver for its default value. Set it to FALSE to get the driver's current setting.
The user is responsible for allocating storage for pszValue and for freeing that memory when pszValue is no longer needed.
To determine the size of the value string, call this function with uTag set to the desired tag and pszValue set to NULL. The puSize parameter will be updated with the necessary size. Using the value in puSize, allocate a string of that size. Then, call this function again, with the desired tag in uTag, the correct size in the puSize parameter, a valid pointer to the allocated string, and the proper flag setting and pszValue will be updated with the value string.
If a valid pointer is passed for the pszValue parameter, then puSize must contain the correct size for the string pointed to by pszValue.
Required DLLs and Libraries
LTISI For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
LIsis::SetTagASCII, LIsis::GetTagASCIIChoice, LIsis::GetTagLong, LIsis::SetTagLong, LIsis::GetTagLongChoice, LIsis::GetTagShort, LIsis::SetTagShort, LIsis::GetTagShortChoice |
Topics: |
|
|
Example
L_VOID IsisASCIITagsExample(LIsis & Isis)
{
L_UINT32 uSize;
L_CHAR * pszTagValue;
L_CHAR szMessage[512];
// Set an ASCII tag (TAG_PAGESIZE) to a new value
Isis.SetTagASCII(TAG_PAGESIZE, "Scanner's Maximum");
/* Get the scanner's default value for TAG_PAGESIZE */
Isis.GetTagASCII(TAG_PAGESIZE, NULL, &uSize, TRUE);
pszTagValue = new L_CHAR[++uSize];
Isis.GetTagASCII(TAG_PAGESIZE, pszTagValue, &uSize, TRUE);
wsprintfA(szMessage,
"The scanner's default value for TAG_PAGESIZE is: %s\n",
pszTagValue);
delete [] pszTagValue;
/* Get the scanner's current value for TAG_PAGESIZE */
Isis.GetTagASCII(TAG_PAGESIZE, NULL, &uSize, FALSE);
pszTagValue = new L_CHAR[++uSize];
Isis.GetTagASCII(TAG_PAGESIZE, pszTagValue, &uSize, FALSE);
wsprintfA(szMessage,
"%sThe scanner’s current value for TAG_PAGESIZE is: %s",
szMessage, pszTagValue);
delete [] pszTagValue;
// Display the values
MessageBoxA(NULL, szMessage, "ASCII Tags Example", MB_OK);
}