Try sending it WM_ENDSESSION, this is the message Windows sends to apps when
it wants to shut down.

If you had a process handle, you could call TerminateProcess

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of vss
> Sent: Friday, 12 October 2001 16:17
> To: Multiple recipients of list delphi
> Subject: [DUG]: Unconditional Shutdown
>
>
> Hi all.
> I have an app. that can only shutdown IF its logged on as an
> administrator, and even then it askes if you are sure etc.
>
> I need to shut the app. down from another app. but if I do SendMessage
> (hwnd, WM_CLOSE, 0, 0) it obviously tells you that only the admin can
> close the app. etc.
>
> Is there a message or method I can use to kill an app. no mater what ?
> i.e. unconditionally like end task in the even manager does ?
>
> I know I can make my own windows message and do it in a procedure, thats
> fine in the next verison of the app. but its the ones out there now I
> need to shut down.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to