Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   KillProcDll addition please (http://forums.winamp.com/showthread.php?t=271704)

computechx 24th May 2007 14:22

KillProcDll addition please
 
Could someone add an ExitProc option to the KillProcDll plugin?
Rather than using terminate process use exitprocess.
If I understand it correctly using exit process will allow the exe to prompt you to for example to save changes before it closes rather than just terminating.

Afrow UK 24th May 2007 15:10

Use the Find, Close or Terminate plugin.

Stu

computechx 24th May 2007 17:41

I'm pretty sure FCT plugin won't work.
I don't have the class or title for the window, only the exe name.
Also not sure if it will work if there is no window, i.e. running in systray?

Afrow UK 25th May 2007 15:58

The way to find out is to write a program to loop through all the windows and print the class names (use EnumWindows).

Stu

Takhir 25th May 2007 16:45

I guess computechx had im mind ExitProcess() in the remote thread. Good idea, but may not work on Vista.

kichik 25th May 2007 16:53

I disagree. You're better off with TerminateProcess than injecting an ExitProcess call. You can never know in which state you'll catch the other process. You can drive into a deadlock. Even more, if FCT failed killing the process with messaging, you can already assume it's deadlocked.

As for Vista, it should only fail if you're trying to kill a protected process which is a bad idea anyway.

Afrow, that program is called Spy++ and it comes with Visual Studio. No need for a rewrite. There are also others available:

http://www.windows-spy.com/
http://www.codeproject.com/dialog/windowfinder.asp


All times are GMT. The time now is 04:40.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.