DTWAIN_GetVersion
The DTWAIN_GetVersion gets the version of DTWAIN that is currently running. This function has been deprecated, and applications should use the DTWAIN_GetVersionEx function.
DTWAIN_BOOL DTWAIN_GetVersion (
Parameters lpMajor Pointer to returned major version number of DTWAIN library in use.
lpMinor Pointer to returned minor version number of DTWAIN library in use.
lpType Pointer to returned DTWAIN Library type (Limited, Demo, Retail, Static Library).
Return Values TRUE if successful. Gets the version of DTWAIN that is being used in the application. If the function fails, FALSE is returned.
Comments This function retrieves the major, minor, and type version of the currently used DTWAIN library. The lpMajor, lpMinor, and lpType are pointers to LONG variables.
On return, the lpType will contain a value representing one or more of the values below. The value in the left column represents a bit value in lpType. If the bit value is 1, then this feature is enabled.
For example, to determine if the 32-bit demo DLL is running, a bitwise AND can be done with the returned type with the bit pattern being tested, then comparing if the result of this AND operation yields the bit pattern being tested.
LONG major, minor, type; // create bitmask that describes demo version and 32-bit version LONG bitMask = DTWAIN_DEMODLL_VERSION | DTWAIN_32BIT_VERSION;
// call function DTWAIN_GetVersion( &major, &minor, &type );
// determine if we have 32-bit demo version by anding our bitmask with the returned flags, // then testing if this result comes back equal to our bitmask. if ( (type & bitMask) == bitMask ) { // this is the 32-bit demo version of DTWAIN }
TWAIN State Transitions None.
Prerequisite Function Call(s) None |