L_WiaInitSession

Summary

Initializes the WIA session.

Syntax

#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaInitSession(uWiaVersion, phSession)

Parameters

L_UINT uWiaVersion

The WIA version to be used. Possible values are:

Value Meaning
WiaVersion1 [1] Use WIA version 1.
WiaVersion2 [2] Use WIA version 2.

pHWIASESSION phSession

Pointer to a WIA session handle. You should keep this handle handy since you are going to need it in almost all other WIA functions.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This feature is available in version 16 or higher.

L_WiaInitSession should be called before calling any other LEADTOOLS WIA toolkit function. Likewise, when the handle to the WIA session is no longer needed, it should be freed by calling L_WiaEndSession. For every call to L_WiaInitSession there must be a call to L_WiaEndSession.

Call the L_WiaIsAvailable function to determine whether a WIA source is installed, and which version of WIA is being used.

✎ NOTE

You do not need to call L_WiaInitSession if you are using the high-level L_WiaAcquireSimple function, since it handles session initialization, session end, and device selection automatically.

Required DLLs and Libraries

Platforms

LEADTOOLS WIA supports both 32-bit and 64-bit image acquisition for both WIA 1.0 (XP and earlier) and WIA 2.0 (VISTA and later).

See Also

Functions

Topics

Example

For an example, refer to L_WiaIsAvailable.

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

LEADTOOLS WIA C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.