#include "ltwrappr.h"
virtual L_INT LWia::InitSession(uWiaVersion)
Initializes the WIA session.
The WIA version to be used. Possible values are:
Value | Meaning |
---|---|
WiaVersion1 | [1] Use WIA version 1. |
WiaVersion2 | [2] Use WIA version 2. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This feature is available in LEADTOOLS version 16 or higher.
Call [LWia:InitSession before calling any other LEADTOOLS WIA toolkit function. Likewise, when the handle to the WIA session is no longer needed, free it by calling LWia::EndSession. For every call to [LWia:InitSession there must be a call to LWia::EndSession.
Call the LWia::IsAvailable function to determine whether a WIA source is installed, and which version of WIA is being used.
Notes
WIA 2.0 does not support cameras or streaming video.
If you are using the high-level LWia::AcquireSimple, you do not need to call [LWia:InitSession, LWia::SelectDevice, or LWia::EndSession because it handles session initialization, device selection, and session end automatically.
Required DLLs and Libraries
For an example, refer to LWia::IsAvailable.