Declare Integer LoadLibrary In kernel32;
STRING lpLibFileName
Declare Integer FreeLibrary In kernel32;
INTEGER hLibModule
?isDLLAvailable('cdosys.dll')
Function isDLLAvailable(DllFilename)
Local hModule
hModule = LoadLibrary(DllFilename)
If hModule > 32
FreeLibrary(hModule)
lRetval = .T.
Else
lRetVal = .F.
ENDIF
RETURN lRetVal
Endfunc