wm-copydata

Can I use WM_COPYDATA to copy a non-struct?

Lets say I have this class in foobar-shared.lib: class FooBar { std::string m_helloWorld; } And I have a call in foobar-from.exe using SendCopyData like so: extern HWND hMainWnd; // foobar-from.exe { FooBar fooBar; HWND hWnd = FindAppWindow(); // foobar-to.exe COPYDATASTRUCT cds; cds.dwData = ('f'|('o'<<8)|('o'<<16)); cds.cbDat...

Sending a struct from C++ to WPF using WM_COPYDATA

I have a native C++ application that, for the time being simply needs to send its command line string and current mouse cursor coordinates to a WPF application. The message is sent and received just fine, but I cannot convert the IntPtr instance in C# to a struct. When I try to do so, the application will either crash without exception ...

Problem in Communication between two dialog boxes through WM_COPYDATA?

Hello all, Friends its really giving me a great head ache about the problem I am facing for the couple of days...Its simple...I want to communicate between two/more dialog boxes for example if there is a variable CString test..I want this test variable to be common for the dialogs/classes(considering each dialog having separate cl...

Use WM_COPYDATA to send data between processes

I wish to send text between processes. I have found lots of examples of this but none that I can get working. Here is what I have so far: for the sending part: COPYDATASTRUCT CDS; CDS.dwData = 1; CDS.cbData = 8; CDS.lpData = NULL; SendMessage(hwnd, WM_COPYDATA , (WPARAM)hwnd, (LPARAM) (LPVOID) &CDS); the receiving part: case WM_COPY...

WM_COPYDATA in Windows 7 blocks application if modal window open

Hello, I have the following scenario: the application receives a WM_COPYDATA it extracts the information (some characters) and is processing the message while processing it displays a window, simulating a modal dialog (disabling its owner; the thread that created the main window, the owner of the modal window, is the same that created...

IPC: WM_COPYDATA + serialization/deserialization

Hello, I am currently working on 2 .NET apps which must communicate with each other. Simple Windows Messaging was chosen and this works nicely at the moment. The data that is sent in the messages is a simple string, but now I have created a message class which contains a command (enum) and a data (string) member, and later possible othe...

Using WM_COPYDATA with Delphi-Prism applications.

Does anyone have a good delphi-prism example of receiving and interpreting a WM_COPYDATA message? I'm particularly interested in how to deal with the message data structure. ...

How do I copy an array of integers between two Delphi Prism applications using WM_COPYDATA?

I'm trying to use WM_COPYDATA to copy data between two Delphi Prism applications on the same computer. In the sender application I have the code: type [StructLayout(LayoutKind.Sequential)] CopyDataStruct = public record var dwData: IntPtr; var cbData: System.Int32; var [MarshalAs(UnmanagedType.ByValArray, SizeConst := ...