typedef struct _LWIAACQUIREOPTIONS
{
L_UINT uStructSize;
L_UINT uMemBufSize;
L_BOOL bDoubleBuffer;
L_BOOL bOverwriteExisting;
L_BOOL bSaveToOneFile;
L_BOOL bAppend;
L_TCHAR szFileName[MAX_PATH];
} LWIAACQUIREOPTIONS, * pLWIAACQUIREOPTIONS;
The LWIAACQUIREOPTIONS structure provides information about options affecting the acquisition process.
Size of this structure in bytes, for versioning. Use the sizeof() operator to calculate this value.
The size in bytes of the buffer that is used for the memory data transfer when the transfer mode is Memory transfer mode.
Flag indicating whether to use double buffering while doing memory transfer. Possible values are:
Value | Meaning |
---|---|
TRUE | Enable double buffering, and in this case the buffer specified through the uMemBufSize will be multiplied by 2 internally. If the passed uMemBufSize value is 0 then the default buffer size (64K) will be used internally and then it will be doubled. |
FALSE | No double buffering is used. This is the default value. |
Value | Meaning |
---|---|
TRUE | Overwrite any existing files found with the same name(s). |
FALSE | Generate new name(s) for the saved file(s) by adding incremented number within braces (). This is the default value. |
Value | Meaning |
---|---|
TRUE | Save all the pages to a single multipage file. |
FALSE | Save the acquired pages to separate files. This is the default value. |
Flag that indicates whether to append the acquired page(s) to the end of an existing file that supports multi page. Possible values are:
Value | Meaning |
---|---|
TRUE | Append the acquired page(s) to the end of the file. |
FALSE | Do not append the acquired page(s) to the end of the file. This is the default value. |
This feature is available in LEADTOOLS version 16 or higher.
pLWIAACQUIREOPTIONS is a pointer to a LWIAACQUIREOPTIONS structure. If the function parameter type is pLWIAACQUIREOPTIONS, declare a LWIAACQUIREOPTIONS variable, update the structure's fields and pass the variable's address in the parameter. Declaring a pLWIAACQUIREOPTIONS variable is necessary only when the program requires a pointer.
LWIAACQUIREOPTIONS is used with the LWia::Acquire, LWia::AcquireToFile, and LWia::AcquireSimple functions.
If the nTransferMode member value is set to TYMED_CALLBACK, the acquire functions will use the memory buffers received from the scanner and generate a BITMAPHANDLE as a result.
This generated BITMAPHANDLE will be returned in the pBitmap parameter of LWia::AcquireCallBack callback when it is fired by calling the LWia::Acquire or LWia::AcquireSimple functions.
If the bSaveToOneFile member is set to FALSE and also the bOverwriteExisting member is set to FALSE, the acquire functions will generate a new file for each acquired page from the device by generating new names of the name you specified through the szFileName member by adding "(N)" to the end of the file name where N represents an incremented number and if the new name already exists it will keep generating a new name until it finds a new one. If the bOverwriteExisting member is set to TRUE, then the acquire functions will generate a new name and check whether it exists. If it does, it overwrites that file.
Microsoft's image acquisition dialog box sets its own initialization properties, such as the current intent (image type), selected area (left, top, width and height), paper source, duplex mode, etc.
If the L_WIA_SHOW_USER_INTERFACE flag is set, Microsoft's image acquisition dialog box overwrites some of the properties set/changed by any of the LWia::SetPropertyXXX or LWia::SetProperties functions.
To prevent overwriting, do not set the L_WIA_SHOW_USER_INTERFACE flag if any LWia::SetPropertyXXX or LWia::SetProperties functions need to be called.
The Microsoft WIA Toolkit has the following, known limitation:
A Win32 version application running on Windows VISTA 64-bit that calls LWia::Acquire, specifying the pnFilesCount and pppszFilePaths parameters, fails to fill those two members with the required information.
To show the manufacturer's image acquisition dialog while acquiring from the scanner, set the uflags member of any of the acquire functions (LWia::Acquire, LWia::AcquireToFile, LWia::AcquireSimple, etc.) to the L_WIA_SHOW_USER_INTERFACE flag.
Be aware that when using WIA 2.0 and the L_WIA_SHOW_USER_INTERFACE flag is set, all members of LWIAACQUIREOPTIONS are ignored except for the szFileName member because the WIA 2.0 acquire dialog has its own way of acquiring to file(s).
If are using WIA 2.0 and you want to use the members of the LWIAACQUIREOPTIONS structure to specify acquisition options, do NOT set the uflags member to the L_WIA_SHOW_USER_INTERFACE flag.
To customize the Image Data Type property (WIA_IPA_DATATYPE), some drivers using WIA 2.0 require the WIA_IPS_CUR_INTENT property value to be set to WIA_INTENT_NONE.