Close other program ?

forum.advanced.programming (1998-2005)
Jay Blinder

Close other program ?

Post by Jay Blinder » 22 Dec 2004, 07:48

 Posted by:  Jay Blinder 

Is it possible (e.g. with a windows message)
to exit an other (not gupta) program ?

Christian Astor

Close other program ?

Post by Christian Astor » 22 Dec 2004, 14:05

 Posted by:  Christian ASTOR 


KB178893

Jay Blinder

Close other program ?

Post by Jay Blinder » 22 Dec 2004, 15:31

 Posted by:  Jay Blinder 

Hi Christian

Strange answer - but I found this:
http://support.microsoft.com/kb/q178893/ :-)

thank you !!!

Philip Hautekiet

Close other program ?

Post by Philip Hautekiet » 23 Dec 2004, 14:10

 Posted by:  Philip Hautekiet 

I think this should work :

Set hWnd1 = SalAppFind('xyz.exe',TRUE)
If hWnd1 != hWndNULL
SalSendMsg(hWnd1,SAM_Close,10,0)

With wParam=10 the application xyz.exe knows who sent the message.

Jim McNamara

Close other program ?

Post by Jim McNamara » 23 Dec 2004, 17:43

 Posted by:  Jim McNamara 

Why 10 for wParam?

Christian Astor

Close other program ?

Post by Christian Astor » 24 Dec 2004, 00:09

 Posted by:  Christian ASTOR 


SAM_Close = WM_CLOSE
wParam & lParam have no meaning.
WM_CLOSE must always be posted, not sent.

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests