Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
End a process in Win2K/WinXP
Message
From
07/10/2002 11:35:07
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00708380
Message ID:
00708388
Views:
14
>>I am using an ActiveX control in my program that doesn't terminate properly when released. It's not a VFP problem - the same thing happens using the control under VB6 using the vendor's own sample files. So far no help from them other than that they designed it this way. I CAN end it by going into Task Manager and ending the process. What I want to do is incorporate this in my program so that when my program ends it also kills this rogue task. Which API call should be used for this, and can it be used under VFP?
>>
>> Thanks,
>
>Randy,
>See Message#496824 for an example.
>

TerminateProcess() is a pretty extreme measure; an ActiveX control should have it's own hWnd, in which case, I'd try sending a WM_CLOSE message to the hWnd of the ActiveX, and issuing a PostQuitMessage() to terminate the VFP session in an orderly fashion. You can also try sending a WM_QUIT to the ActiveX's hWnd.
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