wb_load_library
int wb_load_library (string libname)
Loads a DLL into memory. Returns an integer identifying libname. If libname is
NULL then returns the identifier of the last library returned. The function
accepts fully qualified and raw names. Returns NULL if no library was found.
Name expansion
The function appends some characters to the library name until it finds the
library, then it returns an identifier for that library, or NULL if the library
was not found. If libname is "LIB", for example, the function
looks for the following files, in order:
- LIB
- LIB.DLL
- LIB32
- LIB32.DLL
- LIB.EXE
- LIB32.EXE
For each name, the function looks in the following locations:
- The application directory;
- The current directory;
- The 32-bit System directory (Usually C:\WINDOWS\SYSTEM32 or C:\WINNT\SYSTEM32);
- The 16-bit System directory (Usually C:\WINDOWS\SYSTEM or C:\WINNT\SYSTEM);
- The Windows directory (Usually C:\WINDOWS or C:\WINNT);
- The directory list contained in the PATH environment variable.
Example
// Returns the number of seconds elapsed since the computer
started.
function get_ticks() { static
$KERNEL = null; static $GetTickCount
= null; if($KERNEL === null) $KERNEL
= wb_load_library("KERNEL"); if($GetTickCount
=== null) $GetTickCount
= wb_get_function_address("GetTickCount", $KERNEL); return
(int)(wb_call_function($GetTickCount) / 1000); }
|
See also
wb_call_function
wb_get_function_address
wb_release_library
Low-level functions