473,624 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Examples of using WM_COPYDATA or Sockets between C# and MFC

Hi,

I have a server application (MFC) which communicates through the serial
port.
I need to have a graphical user interface, in c#, which needs to communicate
with the server. At present the user interface is a very dull MFC dialog app
which communicates with the server via WM_COPYDATA.
How easy is it to write a new user interface in C# and communicate with the
server using WM_COPYDATA ?
We have a load of messages defined in C++ which needs to shipped between the
C# and the MFC components.

Would using sockets be more appropiate, easier ??

Thanks in advance !!
Nov 17 '05 #1
1 2642
I'm just starting to play with C# and would like to build one that is remote
controlled by a good-old fashioned MFC app. I would actually prefer to use
WM_COPYDATA rather than mess around with sockets. (By the way, Microsoft
Pipes work really well too.)

If you have any WM_COPYDATA code samples for C# sharp, I would love to be
able to see some snippets.

Thanks.

--
Bob

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1605
by: Frank Bechmann | last post by:
I started to write a SciTe director in python. I had a very basic communication running in Pythonwin but I disliked the strong mixture between Pythonwin's basic functionality and the Pythonwin application. Now I was trying to do the same with wxWindows but I did not find a way to receive the WM_COPYDATA messages sent from SciTe since there is no predefined wx-event for WM_COPYDATA and I got completely lost in the mix of C++/Swig/Python...
3
4535
by: Chris | last post by:
Hi. I'm trying to make a python program that can recieve WM_COPYDATA messages. Not ideal, but the application I'll be receiving them from will only send it that way. So I wrote a small program to try to receive them, and a smaller one to send test messages. It't not happening for some reason. I'll post both below. The program that sends the test message finds the receiver ok, and SendMessage returns 0, but the receving program never...
0
1514
by: Gordon | last post by:
Hi I tried to implement a C++ dll and a Visual Basic .net application, which is able to receive WM_COPYDATA messages from the DLL. Here's my code DLL typedef struct _TRANSTA char teststr }TRANSTAG
0
1754
by: Damir Hakimov | last post by:
Hi All! I'm writing a small programm which must send and service UDP broadcast packets. As start of it I looked at /usr/share/doc/python2.4/Examples/Demo/sockets/broadcast.py damir@debian-IBM:/usr/share/doc/python2.4/examples/Demo/sockets$ python2.4 broadcast.py Traceback (most recent call last):
4
9519
by: Viet | last post by:
Is there any Inter-process Communication examples out there in VB.NET? Specifically, I have app1 that executes app2 as a process and I would like to have app2 display messages in a status bar in app1. I understand that IPC is an option to successfully execute this. TIA! Jonathan
3
1925
by: **** KiteOregon **** | last post by:
How do i receive a wm_copydata message from a third party application? I can't seem to get the data or the message at all in my vb.net application, what do i need to do. thanks -- Just another lost developer.....
1
6276
by: Thomas Kehl | last post by:
Hello. I use the fallowing Functions to send Message from one Application to another. This is working correct on a 32bit System. But on a 64Bit System, the Target-Application will no received anything. Can somebody help me, what I am doing wrong? Private Const _messageID As Integer = -11678085939 Public Const WM_COPYDATA As Integer = &H4A Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
1
2533
by: d-42 | last post by:
Hi, I'm pretty sure I've just got a Marshalling problem, but I'm completely stumped. If there is a better newsgroup to post this in, please point me towards it. First I'm trying to use SendMessage() with WM_COPYDATA to send a string data between two instances of a program. As part of the debugging I've written two methods one where a given instance will obtain its own hWnd and send itself the message, one where it accepts
1
12807
by: xMetalDetectorx | last post by:
I have two C# Applications. The first application has to send 2 strings to the other application. The first string is just a simple string "abc", while the 2nd string contains a path (Application.StartupPath). This is the code I use to send the data: //Used for WM_COPYDATA for string messages public struct COPYDATASTRUCT { public IntPtr dwData; public int cbData; ...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.