Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to kill a COM process
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00731622
Message ID:
00731709
Views:
32
This message has been marked as the solution to the initial question of the thread.
Hi!

See if below could help...
#DEFINE PROCESS_TERMINATE 0x0001

PROCEDURE KillProcess
LPARAMETER tnProcessID

DECLARE INTEGER TerminateProcess IN Win32API INTEGER, INTEGER
DECLARE INTEGER OpenProcess IN Win32API INTEGER, INTEGER, INTEGER

TerminateProcess(OpenProcess(PROCESS_TERMINATE,0,m.tnProcessID),-1)

RETURN
ENDPROC
>I am looking for an API that will allow me to programatically kill a COM server using the Process ID stored in the APPLICATION.processid property. I have an app that creates several out of process COM servers. The app has a termination sequence that normally, release all the object references and 90% of the time, the system shuts down successfully terminating all of the COM servers. However, the remaining 10% of the time, I get an OLE error and the termination sequence goes to h@ll in a handbaskit! I can access the process ID of each of the COM servers in the application.processid property. I need a method that will allow the application to kill the COM processes when they don't terminate normally. Any help would be appreciated.
>I am looking for a function, group of API calls that will allow my UI to terminate COM processes.
>
>Thanks,
>
>Wilson
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform