Solved

How to send message to another program(Written by C)?

Posted on 2002-06-27
1
190 Views
Last Modified: 2010-04-04
Hi all,
How to send message to another program(Written by C)?
I just need to send some simple message/data to another program. My program written by Delphi, the target program written by C.

Please tell me the detail.

Thanks, bin
0
Comment
Question by:xbbin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
h_mohsenian earned 50 total points
ID: 7114214
hi,

you can use PostMessage function. in the VC++ program you can choose a CWnd ( for example a CDialog ) and get its HWnd . after that use this code :

postMessage(VCProgramHandle : HWND , WM_TestMessage : cardinal , wParam , lParam );

also you can use FindWindow API function for finding your VC++ program Window Handle ( the HWND ) in your Delphi program directly.

for example :

Hwnd := FindWindow('CWnd','MyMainVCPPDialogName');

postmessage(Hwnd,...);

I hope it can help you.
Hamed
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question