I've run into this ShellExecute problem in Windows 2000 and wonder if anybody else has seen this or not. I'm using VFP 6.0 SP4, Windows 2000 Server, Office SP1.
If I run this code:
DECLARE Integer ShellExecute IN Shell32.dll LONG, STRING, STRING, STRING, STRING, LONG
?ShellExecute(0,"Open","mailto:
ehardin@hardin-soft.com?subject=test","","",1)
I get the error: Title = "VFP6 - Entry Point Not Found" and Message = "The procedure entry point UninitializeCriticalSection could not be located in the dynamic link library KERNAL32.dll" The error occures when running the ?ShellExecute(... line.
If, however, I include the path to shell32.dll as in
DECLARE Integer ShellExecute IN d:\winnt\system32\Shell32.dll LONG, STRING, STRING, STRING, STRING, LONG
I get no error.
The first example runs fine in Windows 98SE, however. Up 'till now I'be been able to declare and use other Windows API functions so why this one?
Any suggestions would be appreciated. My main concern is, in a distributed app, to prevent this from bombing on a user's machine of unknown configuration?
Ed