LWIAACQUIREOPTIONS

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 the options that affect the acquisition process.

Member Description
uStructSize Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
  Note: This member is ignored when using WIA version 2.0
uMemBufSize The size in bytes of the buffer that is used for the memory data transfer when the transfer mode is Memory transfer mode.
  Note: This member is ignored when using WIA version 2.0
bDoubleBuffer 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.
  Note: This member is ignored when using WIA version 2.0
bOverwriteExisting Flag that indicates whether to save a multiple pages to a single file. Possible values are:
  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.
  Note: This member is ignored when using WIA version 2.0
bSaveToOneFile Flag that indicates whether to save all acquired pages into a single file. Possible values are:
  Value Meaning
  TRUE Save all the pages to a single multi-page file.
  FALSE Save the acquired pages to separate files. This is the default value.
  Note: This member is ignored when using WIA version 2.0
bAppend 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 Dont append the acquired page(s) to the end of the file. This is the default value.
  Note: This member is ignored when using WIA version 2.0
szFileName Character string that contains the file name used in the file transfer mode. Use this member only if the nTransferMode member is set to TYMED_FILE.

Comments

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, you can 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 if your 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 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.

Note:

If the L_WIA_SHOW_USER_INTERFACE flag is set for the uFlags member of any of the acquire functions while you are using WIA 2.0 then all members of this structure except the szFileName member are ignored since WIA 2.0 acquire dialog has its own way of acquiring to file(s). If you are using WIA version 2.0 then you only need to fill the destination file name member of this structure.

But if you do not wish to show the manufacturers image acquisition dialog while acquiring from the scanner by not specifying this flag then you can use all of this structure members even with WIA 2.0.

 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS WIA C++ Class Library Help