Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 May : Parameter is incorrect
| Subject: | Parameter is incorrect |
| Posted by: | "Robert Gilland" (robert.gilla..@basx.com.au) |
| Date: | Tue, 10 May 2005 14:23:18 |
The code below fails in Win98 saying "Parameter is Incorrect"
This happens in the load library function.
Anyone has any Idea why?
Could it be that the Kernel32.dll is already loaded?
GetSystemDirectory(SysDir,MAX_PATH);
TheDLL := IncludeTrailingPathDelimiter(String(SysDir))+'kernel32.dll';
kernel32 := LoadLibrary(PAnsiChar(TheDLL));
ShowMessage(SysErrorMessage(GetLastError()));
ProcAddr := GetProcAddress(kernel32, 'GetDiskFreeSpaceA');
ShowMessage(SysErrorMessage(GetLastError()));
RestoreP := RedirectByRy(ProcAddr, @NewGetDiskFreeSpaceA);
Regards,
Robert.