L_WiaEndSession

#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaEndSession(hSession)

HWIASESSION hSession;

/* handle to an existing WIA session */

Ends a WIA session.

Parameter

Description

hSession

Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This feature is available in version 16 or higher.

This function will clean up and free memory allocated during the WIA session.

Whenever calling any of the LEADTOOLS WIA functions except for L_WiaAcquireSimple. The L_WiaInitSession function must be called to begin a session prior to calling the other function. For each call to L_WiaInitSession there must be a call to L_WiaEndSession to end the session. The L_WiaEndSession function should be the last function to be called in the toolkit.

Note: You do not need to call L_WiaEndSession 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

LTWIA

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Earlier and later operating systems than Windows XP for WIA Version 1.

Windows VISTA or later for WIA Version 2.

See Also

Functions:

L_WiaInitSession.

Topics:

Freeing the WIA Session

 

Initializing a WIA Session

 

WIA Functionality: Session Functions

Example

For an example, refer to L_WiaIsAvailable.