LBase::LoadLibraries

#include "ltwrappr.h"

static L_UINT32 LBase::LoadLibraries (uLibraries, uSubLibraries = 0)

L_UINT32 uLibraries;

/* flag that indicates which libraries to load */

L_UINT32 uSubLibraries;

/* flag that indicates which sub libraries to load */

Loads a specific set of the LEADTOOLS library DLLs at run-time.

Parameter

Description

uLibraries

Flag that indicates which LEADTOOLS library DLLs to load. Possible values are given below, and may be combined.

 

Value

Meaning

 

LT_KRN

load the ltkrnXXn.dll for Non-Unicode or ltkrnXXnu.dll for Unicode.

 

LT_DIS

load the ltdisXXn.dll for Non-Unicode or ltdisXXnu.dll for Unicode.

 

LT_FIL

load the ltfilXXn.dll for Non-Unicode or ltfilXXnu.dll for Unicode.

 

LT_IMG

load the ltimgXXn.dll for Non-Unicode or ltimgXXnu.dll for Unicode.

 

LT_EFX

load the ltefxXXn.dll for Non-Unicode or ltefxXXnu.dll for Unicode.

 

LT_DLG

load the ltdlgXXn.dll for Non-Unicode or ltdlgXXnu.dll for Unicode.

 

LT_ISI

load the ltisiXXn.dll.

 

LT_TWN

load the lttwnXXn.dll for Non-Unicode or lttwnXXnu.dll for Unicode.

 

LT_SCR

load the ltscrXXn.dll for Non-Unicode or ltscrXXnu.dll for Unicode.

 

LT_ANN

load the ltannXXn.dll for Non-Unicode or ltannXXnu.dll for Unicode.

 

LT_NET

load the ltnetXXn.dll for Non-Unicode or ltnetXXnu.dll for Unicode.

 

LV_KRN

load the lvkrnXXn.dll for Non-Unicode or lvkrnXXnu.dll for Unicode.

 

LV_DLG

load the lvdlgXXn.dll for Non-Unicode or lvdlgXXnu.dll for Unicode.

 

LT_TMB

load the lttmbXXn.dll for Non-Unicode or lttmbXXnu.dll for Unicode.

 

LT_LST

load the ltlstXXn.dll for Non-Unicode or ltlstXXnu.dll for Unicode.

 

LT_BAR

load the ltbarXXn.dll for Non-Unicode or ltbarXXnu.dll for Unicode.

 

LT_ZMV

load the ltzmvXXn.dll for Non-Unicode or ltzmvXXnu.dll for Unicode.

 

LT_IMGOPT

load the ltimgoptXXn.dll for Non-Unicode or ltimgoptXXnu.dll for Unicode.

 

LT_ALL_LEADLIB

load all available LEADTOOLS libraries

 

These values can be combined using the bitwise OR operator ( | ).

uSubLibraries

Flag that indicates which LEADTOOLS dialog library DLLs to load, this value is only valid if uLibraries contains LT_DLG. Possible values are given below, and may be combined.

 

Value

Meaning

 

LT_DLGIMGEFX

load the ltdlgimgefxXXn.dll for Non-Unicode or ltdlgimgefxXXnu.dll for Unicode.

 

LT_DLGEFX

load the ltdlgefxXXn.dll for Non-Unicode or ltdlgefxXXnu.dll for Unicode.

 

LT_DLGFILE

load the ltdlgfileXXn.dll for Non-Unicode or ltdlgfileXXnu.dll for Unicode.

 

LT_DLGIMG

load the ltdlgimgXXn.dll for Non-Unicode or ltdlgimgXXnu.dll for Unicode.

 

LT_DLGIMGDOC

load the ltdlgimgdocXXn.dll for Non-Unicode or ltdlgimgdocXXnu.dll for Unicode.

 

LT_DLGCLR

load the ltdlgclrXXn.dll for Non-Unicode or ltdlgclrXXnu.dll for Unicode.

 

LT_DLGKRN

load the ltdlgkrnXXn.dll for Non-Unicode or ltdlgkrnXXnu.dll for Unicode.

 

LT_DLGWEB

load the ltdlgwebXXn.dll for Non-Unicode or ltdlgwebXXnu.dll for Unicode.

 

LT_ALL_DLG

load all available LEADTOOLS dialogs libraries

 

These values can be combined using the bitwise OR operator ( | ).

Returns

An L_UINT32 value representing the LEADTOOLS libraries that were loaded successfully. This can be any combination of the constants described above.

Comments

Call this function to load a specific set of the LEADTOOLS library DLLs at run-time. The specified constants will determine which libraries you want to load. If the library is already loaded then this function will not load it again. You can use this function to minimize the memory footprint of your program by loading and unloading the libraries you need when necessary.

Note: if you use LT_DLG in the uLibraries parameter without passing any flag in uSubLibraries, all LEAD dialogs will be loaded by default.

Required DLLs and Libraries

LTKRN

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

Elements:

LBase::UnloadLibraries, LBase::GetLoadedLibraries, Class Members

Example

/*The following code will load the LEADTOOLS library for the TWAIN scanner driver (assuming that ltkrnXXn.dll is already loaded), and scan an image to a bitmap:*/

LTwain MyTWAIN;
LBitmapBase MyBitmap;

if(LBase::LoadLibraries(LT_TWN)& LT_TWN)
{
   MyTWAIN.SetBitmap(&MyBitmap);
   MyTWAIN.Acquire ((LBitmap*)NULL,0,0,NULL);
   LBase::UnloadLibraries(LT_TWN);
}