Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
Initializing a WIA Session
Unless you are using high-level LWia::AcquireSimple function, you should first initialize a WIA session before using the features available in the LEADTOOLS WIA toolkit. This is done by call the LWia::InitSession function. The LWia::InitSession function initializes the session with multi-threading. Each call to this function will create a session handle of type HWIASESSION. This handle is passed to many of the LEADTOOLS WIA Class Libary functions, so this function must be called before calling other LEADTOOLS WIA functions (except LWia::AcquireSimple). 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, it is recommended that you select the WIA source to be used for acquiring images. For more information, refer to Managing WIA Sources.