API to Shutdown Program?

JDT
03-31-2001, 03:26 PM
I am looking for an API to unconditionaly shut down any program running by its handle or something like that.

I have tried all the SendMessage and PostMessage variations and they are not quit capable of shutting down AOL 100% of the time.

Is what I am doing is:

I have an icon in the task bar and when I double click it, AOL shuts down.

Why? Because AOL has a habit of just sitting there consuming my resources for unbelievable amounts of time while it decides if its going to let me turn it off.

I would like it to be like ctrl alt delete without any message displayed.

Even if smoke comes out the back of my computer, I want AOL to turn off when I say so! ;<)

Any Ideas?

JDT

Ghostie
04-02-2001, 09:54 AM
Hi JDT

Don't know if you have solved this yet, but in case you haven't

Have you looked at the "TerminateProcess" API ? Looks like it might be what you want.

You might also want to read "HOWTO: Terminate an Application "Cleanly" in Win32 " in the MSDN library

Hope this helps.

/Ghostie

JDT
04-03-2001, 01:42 AM
Thanks Ghostie

I think that API or its little brother ExitProcess is what I need. When I get some time I'll try them out.

JDT

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum