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.
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.
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.