DTWAIN_GetCapFromName
The DTWAIN_GetCapFromName function gets the capability value that matches the supplied name.
LONG DTWAIN_GetCapFromName ( LPCTSTR szBuffer );
Parameters
szBuffer Specifies the address of the null-terminated character buffer of the name of the capability.
Return Values If the function succeeds, a capability defined by the TWAIN specification is returned. If the function fails, -1 is returned.
Character specific version
Comments The DTWAIN_GetCapFromName function returns the TWAIN capability that matches the name supplied by szBuffer. For example if szBuffer is the string "ICAP_BITDEPTH", DTWAIN_GetCapFromName will return 4395, the value of the ICAP_BITDEPTH capability defined by the TWAIN specification.
The name supplied can be a mixture of upper or lower case, and can have trailing or leading spaces. However it must match exactly with one of the TWAIN capability names found in the TWAIN 1.8 specification. For custom capabilities, the string must be "CAP_CUSTOMBASE + xxxx ", where "xxxx" is the decimal representation of the arithmetic difference between the capability and 32,768. For example, if the custom capability has a decimal value of 32,800, the following:
DTWAIN_GetCapFromName("CAP_CUSTOMBASE + 32");
will return 32,800.
TWAIN State Transitions None
Prerequisite Function Call(s)
See Also |