Communication between applications

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
CarlosMora
Portugal
Posts: 20
Joined: 13 May 2020, 12:34
Location: Portugal

Communication between applications

Post by CarlosMora » 24 Apr 2006, 18:06

 Posted by:  Carlos Mora 

Hello NG,

I need to order application #1 to close itself from application #2.

In old Windows NT4, 95 and 98 I used Call SalSendMsg( SalNumberToWindowHandle( -1 ), AM_MyOrderToKill, 0, 0 ) but now it doesn't work anymore.

I can't use SalAppFind since the application I want to kill is in the Hashtray and therefore not visible.

Can anyone give me a push?

Thanks in advance

(Carlos Mora)

Pawel

Re: Communication between applications

Post by Pawel » 25 Apr 2006, 09:28

 Posted by:  Pawel 

See atachment

Regards,

Pawel
You do not have the required permissions to view the files attached to this post.

Günther Feldzahn

Re: Communication between applications

Post by Günther Feldzahn » 25 Apr 2006, 10:02

 Posted by:  Günther Feldzahn 

Hi
There are several methods

1. Tell app#2 the windowhandle from app#1 as a program parameter, then you
can Post (Not send) messages from #2 to #1 as many as you like
2. Good old DDE - You have to use the Windows API, because SALDDE functions
have been dumped
3. System Synchronization Objects (Semaphores, Events - You have to use the
Windows API
4. Named Pipes, Sockets, ... but the effort is worth only, if you require
lots of data exchange

Good luck
Günther

Alfredo Monasi

Re: Communication between applications

Post by Alfredo Monasi » 25 Apr 2006, 15:32

 Posted by:  Alfredo Monasi 

I got the following errors

SQLWindows Error Log

Application File: C:\Documents and Settings\amonasi\Escritorio\AppSendTo.apt

--- Begin Error Output ---

Source: Set classThread.strParam = "It's posiible"
Position: 11 Error: Symbol is undefined or unable to be referenced from current location: classThread

Source: Set classThread.strParam = STRING_Null
Position: 11 Error: Symbol is undefined or unable to be referenced from current location: classThread

Source: Call classThread.SendMsgToThread( "App2.exe", MY_QUIT, 0, 0 )
Position: 11 Error: Symbol is undefined or unable to be referenced from current location: classThread

Source: Call classThread.SendMsgToCurrentThread( MY_QUIT, 0, 0 )
Position: 11 Error: Symbol is undefined or unable to be referenced from current location: classThread

Source: Call SalMessageBox( classThread.strParam, "Meesage", 0 | 48 )
Position: 26 Error: Symbol is undefined or unable to be referenced from current location: classThread

--- End Error Output ---

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests