Solved

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

Posted on 2002-06-27
1
186 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 359
Delphi Form ownership 4 127
How to save the image in the .cds File ClientDataSet? 1 32
Using MMsystem To change audio input 1 20
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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