- Returns the handle to the DLL module. If the DLL hasn't been loaded yet or is not found, this
function returns 0.
DECLARE FUNCTION UpdateWindow LIB "USER32" ALIAS _
"UpdateWindow" (hWnd AS LONG) AS LONG
UpdateWindow(0) '-- Using function will load DLL
hInst& = LIBRARYINST("USER32")
For certain cases you may need to use theWindows API "loadLibrary"
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA"_
(ByVal lpLibFileName As String) As Long
hDll& = LoadLibrary("nviewlib.dll")
'returns DLL handle if available
Declaring a function as a DLL function does not automatically load the
DLL. The DLL is loaded once the function is used. Please note that
library names should match, so in your declaration for LIB "USER32" ...
to find this library, you must match that same name. ie.
LIBRARYINST("USER32.DLL") returns 0, it must be "USER32" in this
particular case. See also UNLOADLIBRARY.
RapidQ does not support compile-time linking with another .lib file.
Use FreeBasic or other compilers (BCX, FreeBasic, etc) to create
your own DLL files.