David
I think you may need to PostMessage() the WM_CLOSE messages
because FindWindow may give them to you in the "wrong"
order.
I have a proc that does this by doing an EnumWindows
and posting WM_CLOSE and (AFAIK <g>) it is still working.
(Perhaps I should check it on Win2k!)
ns
-----Original Message-----
From: David O'Brien <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Wednesday, 27 September 2000 05:56
Subject: [DUG]: Killing WOWExec
>I know this has been covered before, but I can't find it.
>
>I need to kill WOWExec. (Sounds simple)
>Sending a WM_Close message doesn't do it, and TerminateProcess doesn't seem
>to do it.
>Running 2000 Pro.
>
>I am trying:
>
>SendMessage(FindWindow(nil, 'WOWExec'), WM_CLOSE, 0, 0) ;
>
>or
>
>TerminateProcess(FindWindow(nil, 'WOWExec')) ;
>
>Is the Hwnd returned in EnumWindows the correct handle to use here?
>Do I need to look at access rights?
>
>The "Window" 'WOWExec' does exist.
>
>any ideas?
>
>Dave.
>---------------------------------------------------------------------------
> 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"
---------------------------------------------------------------------------
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"