LBase::LoadLibraries

#include "ltwrappr.h"

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

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 ltkrn??u.dll for Win32 or ltkrnxx?.dll for X64.

 

LT_DIS

load the ltdis??u.dll for Win32 or ltdisxx?.dll for X64.

 

LT_FIL

load the ltfil??u.dll for Win32 or ltfilxx?.dll for X64.

 

LT_IMG

load the ltimg??u.dll for Win32 or ltimgxx?.dll for X64.

 

LT_EFX

load the ltefx??u.dll for Win32 or ltefxxx?.dll for X64.

 

LT_DLG

load the ltdlg??u.dll for Win32 or ltdlgxx?.dll for X64.

 

LT_TWN

load the lttwn??u.dll for Win32 or lttwnxx?.dll for X64.

 

LT_SCR

load the ltscr??u.dll for Win32 or ltscrxx?.dll for X64.

 

LT_ANN

load the ltann??u.dll for Win32 or ltannxx?.dll for X64.

 

LT_NET

load the ltnet??u.dll for Win32 or ltnetxx?.dll for X64.

 

LV_KRN

load the lvkrn??u.dll for Win32 or lvkrnxx?.dll for X64.

 

LV_DLG

load the lvdlg??u.dll for Win32 or lvdlgxx?.dll for X64.

 

LT_TMB

load the lttmb??u.dll for Win32 or lttmbxx?.dll for X64.

 

LT_LST

load the ltlst??u.dll for Win32 or ltlstxx?.dll for X64.

 

LT_BAR

load the ltbar??u.dll for Win32 or ltbarxx?.dll for X64.

 

LT_ZMV

load the ltzmv??u.dll for Win32 or ltzmvxx?.dll for X64.

 

LT_IMGOPT

load the ltimgopt??u.dll for Win32 or ltimgoptxx?.dll for X64.

 

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 ltdlgimgefx??u.dll for Win32 or ltdlgimgefxxx?.dll for X64.

 

LT_DLGEFX

load the ltdlgefx??u.dll for Win32 or ltdlgefxxx?.dll for X64.

 

LT_DLGFILE

load the ltdlgfile??u.dll for Win32 or ltdlgfilexx?.dll for X64.

 

LT_DLGIMG

load the ltdlgimg??u.dll for Win32 or ltdlgimgxx?.dll for X64.

 

LT_DLGIMGDOC

load the ltdlgimgdoc??u.dll for Win32 or ltdlgimgdocxx?.dll for X64.

 

LT_DLGCLR

load the ltdlgclr??u.dll for Win32 or ltdlgclrxx?.dll for X64.

 

LT_DLGKRN

load the ltdlgkrn??u.dll for Win32 or ltdlgkrnxx?.dll for X64.

 

LT_DLGWEB

load the ltdlgweb??u.dll for Win32 or ltdlgwebxx?.dll for X64.

 

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.

Platforms

Win32, x64.

See Also

Functions:

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:

L_INT LBase__LoadLibrariesExample()
{
	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);
	}
	return SUCCESS;
}