Initializing a WIA Session

How a WIA session is initialized depends on whether high-level (LWia::AcquireSimple) or low-level functions (LWia::Acquire, LWia::AcquireToFile, etc. ) are being used.

High-level Functions

If the high-level LWia::AcquireSimple is being used, it is not necessary to call LWia::InitSession, LWia::SelectDevice, or LWia::EndSession because LWia::AcquireSimple handles session initialization, device selection, and ending the session automatically.

Low-level Functions

If you are using the low-level functions, call LWia::InitSession first to initialize the session with multi-threading. Each call to LWia::InitSession creates a session handle of type HWIASESSION. The session handle is used in many LEADTOOLS WIA Class Libary functions, so this function must be called before calling other LEADTOOLS WIA functions. Note that for each call to LWia::InitSession there must be a call to LWia::EndSession.

WIA does not have a default device selection capability. Therefore, after establishing the WIA session handle, select the WIA source to be used for acquiring images. For more information, refer to Managing WIA Sources.

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.