I would like to use the following code to try to test if required dlls are installed.
When stepping the code I get an error on hModule = LoadLibrary(DllFilename) - LoadLibrary not found().
As a consequence It always returns .T.
Can anyone help with this?
Regards
Bryan
Code:
PARAMETERS mydll
DECLARE INTEGER FreeLibrary IN kernel32;
INTEGER hLibModule
?isDLLAvailable(mydll)
FUNCTION isDLLAvailable(DllFilename)
LOCAL hModule
hModule = LoadLibrary(DllFilename)
IF hModule > 32
FreeLibrary(hModule)
lRetval = .T.
ELSE
lRetval = .F.
ENDIF
RETURN lRetval
ENDFUNC
When stepping the code I get an error on hModule = LoadLibrary(DllFilename) - LoadLibrary not found().
As a consequence It always returns .T.
Can anyone help with this?
Regards
Bryan