Questions tagged [wm-copydata]

63 questions
0
votes
1 answer

Sending WM_COPYDATA but getting WM_ACTIVATEAPP on the receiving side

I have the following scenario: My app gets some data from the command line. After getting executed by the first time, my app runs always one instance and that instance will be in memory until the use explicitly tells it to shutdown instead of just…
osiris
  • 432
  • 5
  • 18
0
votes
1 answer

What is a good alternative to using CopyData to an elevated application

I have an application that stops a service, copies a file, then starts the service again. I want it to display a progress bar and no extra window, no changing screens, just let the UAC do its thing and continue from there (it's a configuration…
Patrick
  • 1,766
  • 1
  • 15
  • 27
0
votes
2 answers

How to use PostMessage with WM_COPYDATA for sending string message

I have two windows applications. First one a windows forms application. The second one a console application. I have to send a message from the console application to the forms application. I registered broadcast message and using ::PostMessage…
Sam
  • 113
  • 5
  • 13
0
votes
0 answers

Why WM_COPYDATA Not Passing C# string Data

I need to pass an object of a class from one program to another. This is the class I need to pass; [StructLayout( LayoutKind.Sequential, CharSet = CharSet.Ansi )] public class MessageContainer { public bool DescFirst { get; set; } …
Buddhi Dananjaya
  • 643
  • 2
  • 12
  • 32
0
votes
1 answer

JNA : Correct mapping for COPYDATASTRUCT?

I have struggled a lot to make it work (a call to win32 API : SendMessage with WM_COPYDATA and COPYDATASTRUCT to hold the data) and as it works on my windows 7 computer now, I am wondering if my mapping is the good one and if there is no side effect…
cnico7
  • 3
  • 2
0
votes
0 answers

How to define lParam for COPYDATASTRUCT?

So I kinda followed this : https://msdn.microsoft.com/en-us/library/ms649009(v=vs.85).aspx and this: Use WM_COPYDATA to send data between processes For sending data between a openframeworks application and unreal engine 4. Now everything seems to…
Alexander S.
  • 158
  • 2
  • 16
0
votes
3 answers

IPC: WM_COPYDATA + serialization/deserialization

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…
Janiek Buysrogge
  • 1,244
  • 10
  • 15
0
votes
0 answers

Why is this WM_COPYDATA code not working?

I need to pass a object of a class from one c# application to another (Same machine different folders). Tried following.... public static void SendMessageWithData( IntPtr destHandle, IntPtr srcHandle ) { COPYDATASTRUCT cds = new…
Buddhi Dananjaya
  • 643
  • 2
  • 12
  • 32
0
votes
1 answer

Windows API: find process of message sender (WM_COPYDATA)

I created an SSH agent (similar to PuTTY's pageant.exe) which has a predefined protocol and authentication requests are sent to the agent window via WM_COPYDATA. I now want to display which process requested authentication. For this I need to know…
divB
  • 896
  • 1
  • 11
  • 28
0
votes
0 answers

Python to C++ Communication via SendMessage

I'm using Python2.7 and Visual Studio 2010 on Windows 7 Professional. I'm trying to use SendMessage to send a copydatastruct object to a MFC C++ program. The C++ program receives the message fine, however, I cannot figure out the correct data type…
0
votes
1 answer

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 =…
Nick Bolton
  • 38,276
  • 70
  • 174
  • 242
0
votes
1 answer

Stored procedure to copy data in SQL Server

I want to move data from one table to another with same database using a stored procedure. Each time stored procedure executes only updated columns are copied from one table to other in SQL Server.
-1
votes
1 answer

Why I cannot find window?

I use this example to send a string between two applications. When I press the Send button for the first time, the string is sent to the Receiver, but only a part of the string is received. When I press the Send button for the second time, I get…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
-1
votes
1 answer

How to read other process memory

So, I have a class that uses WM_COPYDATA to allow applications to communicate. type TMyRec = record Name: string[255]; Age: integer; Birthday: TDateTime; end; function TAppCommunication.SendRecord(const ARecordToSend: Pointer; const…
-1
votes
1 answer

How to cast a LRESULT to a custom struct type?

I use sendMessage and replyMessage to communicate between two apps in the same laptop. On the receiver side, when it receives the message comes from sender, it will reply with a message. So in the sender process, it will cast the MyStruct to…
firstaccount
  • 155
  • 2
  • 13