Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Somebody can helpme with a api call??
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00165704
Message ID:
00165736
Views:
10
>>>>i have som problems with GetExitCodeProcess and ShellExecute, could somebody help me??
>>>
>>>I don't know if I can help with GetExitCodeProcess (you need the process handle), but I can help with ShellExecute. What do you want to know and what are you trying to do?
>>if I use shellexecute, it give me a instance handle, but if i use GetExitCodeProcess, it gives me an error6, not a vlaid proccess handle.
>
>Hi Miguel,
>
>ShellExecute doesn't return the value that GetExitCodeProcess needs. It returns the instance handle, not the process handle, which is what's required. If you were to start the process with CreateThread() I think (but am not 100% sure) that you'll get the value you need.

CreateProcess(), not CreateThread(). CreateThread() launches a thread in the memory context of the current process. VFP has kittens if you try this...

>
>If you're just trying to shut down another application, look at my FAQ on the subject. It show's how to close another windows program.
>
>hth,
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform