LoadLibrary

Top  Previous  Next

Prototype

 

IntDLLHandle:= LoadLibrary(StrDLLName)

 

Description

 

Load external DLL.

 

Parameters

 

StrDLLHandle: DLL name to load

 

Returned Value

 

IntDLLHandle: DLL Handle

 

Notes

 

None.

 

Example

//It initializes a string variable

Test:='TO BE CONVERTED IN LOWERCASE';

 

//It logs a input string

ApplicationLog('Before: '+Test);

 

//Load library

DLLHandle:=LoadLibrary('USER32.DLL');

if DLLHandle<>0 then

begin

 //Call DLL CharLowerA function

 CallLibrary(DLLHandle,'CharLowerA',Test);

 //Free memory

 FreeLibrary(DLLHandle);

end

else ApplicationLog('Unable to load USER32.DLL!');

 

//It logs output string

ApplicationLog('After: '+Test);