Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LTwain::InitSession
#include "ltwrappr.h"
virtual L_INT LTwain::InitSession (pAppData)
pAPPLICATIONDATA pAppData; |
/* pointer to a structure */ |
Initializes the TWAIN session.
Parameter |
Description |
pAppData |
Pointer to an APPLICATIONDATA structure. This structure will have the handle of the parent window in addition to other data about the application. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
LTwain::InitSession must be called before calling any other LTwain object functions.
When the handle to the TWAIN session is no longer needed, it should be freed by calling LTwain::EndSession. For every call to LTwain::InitSession there must be a call to LTwain::EndSession.
Note: If this function returned ERROR_TWAIN_INVALID_DLL error, then this is mostly because you have an old version of TWAINDSM.DLL in your system folder, you need to make sure you have at least version 2.0.9.0 of this DLL. You can download it from www.twain.org.
Required DLLs and Libraries
LTTWN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
|
Topics: |
|
|
Example
For an example, refer to LTwain::IsAvailable.