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
Solved

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

Posted on 2002-06-27
1
183 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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
Virtuailstring tree compare node issue 14 125
Help on project with Soap 10 57
Firemonkey DbLookupComboBox equivalent ? 2 54
RESTRequest Parameter 4 41
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…

791 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