PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Loading and unloading the DLL
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Loads the specified library (DLL) in memory. A 32-bit application can load a 32-bit library, a 64-bit application can load a 64-bit library. This library will be loaded in memory until:
  • the application ends,
  • FreeDLL is run.
Linux Loads the specified .so library in memory.
Example
hInst is int
hInst = LoadDLL("MyDLL.DLL")
IF hInst = 0 THEN
Error(ErrorInfo())
ELSE
Info("DLL loaded")
FreeDLL(hInst)
END
hInst is int
hInst = LoadDLL("MyDLL.DLL")
IF hInst = 0 THEN
Error("Error during the unload operation")
ELSE
CallDLL32("MyDLL", "FunctionA", par1, par2)
CallDLL32("MyDLL", "FunctionB", par1)
FreeDLL(hInst)
END
Syntax
<Result> = LoadDLL(<DLL Name>)
<Result>: Integer
  • Instance of loaded DLL,
  • 0 if an error occurred. To find out the error details, use ErrorInfo.
<DLL Name>: Character string
Name of library (DLL) to load. This name can be a full name or a relative name but the extension (.DLL in most cases) must be specified.
If this parameter corresponds to a relative name, the library will be sought:
1. In the directory where the executable corresponding to the current process is found.
2. In the current directory.
3. In the system directory of Windows. In most cases, "C:\Windows\System" (98) or "C:\Winnt\System32" (NT/2000).
4. In the Windows directory.
5. In the directories specified in PATH.
Linux Name of .so library to load.
Remarks

Loading and unloading the DLL

CallDLL32 automatically loads the DLL if necessary, then unloads it (if it was loaded). This mechanism can be quite slow, except for the system DLLs (KERNEL, USER, GDI).
To optimize the execution speed, we advise you to load the DLL once with LoadDLL and to unload it with FreeDLL when the DLL is no longer used.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Linux wd230vm.so
Windows Mobile wp230vm.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment