Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
Initializing a WIA Session
Unless you are using high-level L_WiaAcquireSimpleLWia::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 L_WiaInitSessionLWia::InitSession function. The L_WiaInitSessionLWia::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 C DLLClass Libary functions, so this function must be called before calling other LEADTOOLS WIA functions (except L_WiaAcquireSimpleLWia::AcquireSimple). Note that for each call to L_WiaInitSessionLWia::InitSession there must be a call to L_WiaEndSessionLWia::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.