Groups | Blog | Home
all groups > dotnet compact framework > june 2005 >

dotnet compact framework : Send and Recieve Message


jeff
6/21/2005 10:47:07 AM
hi,sir

Can I send/receive message betwenn with other Application Created by
evc4.0?

Paul G. Tobey [eMVP]
6/21/2005 10:52:17 AM
You'll have to be a little more specific about *what* it is that you want to
exchange with the other application, but, yes, you can do that. Named
events, window messages, sockets would all be possibilities (there are
others, too).

Paul T.

[quoted text, click to view]

Chris Tacke, eMVP
6/21/2005 1:54:11 PM
Sure. There are many ways. Take a look at this blog entry:

http://www.danielmoth.com/Blog/2004/09/ipc-with-cf-on-ce-part-1.html

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


[quoted text, click to view]

jeff
6/21/2005 2:48:02 PM
Oh,Sorry

What I want to do is:
I have a C# project with Windows Form,
and another project create by Evc4.0 CDialog base(I modify it to Cwnd, run
background)
When C# Windows.Form click a menu,to trick some function within Evc project.
After Evc project finish his job, send back message to C# project

Thanks



[quoted text, click to view]
jeff
6/22/2005 7:50:01 AM
Thanks Chris Tacke.

I have looked into the website.
It gives me lots of help;
now My question is:
I create a Window Application by Evc4.0 (indenpend exe file)
and another window Application by C#(indenpend exe file),
I want to communicate message between them.

On Evc Application4.0, I use findwindow to get the Handle of C#Window
Application.
and use Sendmessage, It does not work.
I can not transfer the HWND of C# application MessageWindow to evc4.0
Application.

Is it Possiable about my issue?

thanks




[quoted text, click to view]
Paul G. Tobey [eMVP]
6/22/2005 10:15:45 AM
Look at P/Invoking SendMessage() or PostMessage() to send a message to all
top-level windows in the system (or you may be able to use FindWindow() to
locate the right window of your eVC program, to minimize your broadcasting
of messages). Going in the other direction, you could use, again, a
broadcast and use something like ApplicationEx and an IMessageFilter
(defined by OpenNETCF's SDF), to catch the return message from the eVC
program.

Paul T.

[quoted text, click to view]

jeff
6/22/2005 2:47:05 PM
Thanks Paul G.

Now I get my application works, and It works pretty good.
I have another question :

When I use SendMessage to C# Windows Application.I use MessageWindow to
Listen the message.
I want to send a string to C# Window Application
So I write :
LPTSTR szContent = _T("want to send to c#");
SendMessage(TO_CSHARP_MESSAGE,(WPARAM)szContent,0);

however, C# side, How can I change the WPARAM parameter to string?

thanks







[quoted text, click to view]
AddThis Social Bookmark Button