First of all, apologies for using English on this forum.

I am a Finn and I have studied Deutsch only 3 years at school, so my German is a bit rusty.
I wrote a small application with Delphi 4, that uses ShellExecuteA function of Shell32.dll to launch another exe. It works 100% on Windows 95, 98 and ME, but fails on Win2000. Error message says that Shell32.dll is not found, but Shell32.dll IS in System32 directory.
Apparently ShellExecuteA of Shell32.dll does not work on Windows 2000?
Any ideas? Other functions I could use?
Or could it be that it is ExtractFilePath(ParamStr(0)) that fails on Win2000? I use ExtractFilePath(ParamStr(0)) to define the path to the other exectuable which I start with ShellExecuteA.
Here's the code:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
| uses
function ShellExecute(hWnd: HWND; Operation, FileName, Parameters, Directory: PChar; ShowCmd: Integer): HINST; stdcall;
implements
function ShellExecute; external 'shell32' name 'ShellExecuteA';
Actual call:
ShellExecute(handle, 'open', Pchar(ExePath) , nil, nil, SW_SHOWNORMAL); |
Moderiert von
Christian S.: Replaced Code- with Delphi-Tags