Questions tagged [wm-copydata]

63 questions
2
votes
1 answer

WM_COPYDATA without a class in Delphi

I would like to send / receive a string from 2 CONSOLE Applications (2 different PIDs with no Forms!). I saw that I need the declare this in a class. Is it possible to do this without having a class at all in a console application? If so, how I can…
Ben
  • 3,380
  • 2
  • 44
  • 98
2
votes
1 answer

Sendmessage with WM_COPYDATA from vb6 to delphi is garbled

i am sending data to a delphi app using WM_COPYDATA from vb6 app. in my system which local is english, i receive the data correctly, but on another system with dutch local, the receive text is garbled. the receiving app is the delphi, the code…
Smith
  • 5,765
  • 17
  • 102
  • 161
1
vote
3 answers

WM_COPYDATA with and without quotes yields different results

Using WM_COPYDATA to pass command line params to another app instance with Delphi XE as follows: function DAppInstance.SendParamsToPrevInstance(AWindowHandle: THandle): Boolean; var copyData: TCopyDataStruct; cmdParams : string; i :…
MX4399
  • 1,519
  • 1
  • 15
  • 27
1
vote
1 answer

OutputDebugString with both WinDbg and DbgView

With DebugView is simple: I clear its output window with "DBGVIEWCLEAR" (in OutputDebugString, ODS), and then I show some 10 lines of info. I do this with a timer, 10 times per second. But, while using WinDbg, DebugView doesn't get any output from…
aleksazr
  • 89
  • 7
1
vote
0 answers

How to get WM_COPYDATA in python

i'm trying to do (what should be) some minor work with win32. I basically just need to send a message and wait for a response. I need the HWND or window handle of my python script/program to actually send the message. I need to receive a…
BunnyHoppin
  • 39
  • 2
  • 5
1
vote
2 answers

Is it safe to use LPCTSTR in a structure with the WM_COPYDATA message?

I have this structure: typedef struct tagCOPY_PACKET { TCHAR szFile[_MAX_PATH]; GUID guidSignature; } S_COPY_PACKET; I prepare to send data with WM_COPYDATA like this: CString strFile = GetFileToOpenFromFileExplorerPath(); S_COPY_PACKET…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

How can the hookWindowMessage WM_COPYDATA callback parameters be converted to JavaScript in Electron/NodeJS?

Our C++ application sends a WM_COPYDATA message: typedef struct tagNotificationStruct { char msg[255]; } NotificationStruct; void __stdcall LogMessageWrite() { const char* pszMessage = "Test 1 2 3"; NotificationStruct notification; …
1
vote
1 answer

Is it safe to use WM_COPYDATA between 64-and 32-bit (WOW64) apps?

There is a good SO Q/A session on the general use of WM_COPYDATA messages here, and a 'discussion' about whether or not this will work between apps of different 32/64-bitness here. However, the latter seems to be focussed on possible misuse of the…
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
1
vote
1 answer

Send text from VB to Delphi apps, using SendMessage

) I am trying to send a short text from a VB app to Delphi app.. here is the VB Code: Sender Program "Sender" Public Class SendData Const WM_COPYDATA = &H4A Public Structure CopyDataStruct Public dwData As Integer Public cbData As…
Fred
  • 21
  • 2
1
vote
2 answers

How to send a short string from a Visual Basic application to a Delphi application?

I need to send a short string, (less than 30 bytes, but sent every second), from one VB application, to a Delphi application.. is this possible, using CopyDataStruct, WM_COPYDATA and SendMessage functions in Windows?
Fred
  • 21
  • 2
1
vote
1 answer

How to fix 'Receiver application gets empty message via WM_COPYDATA' issue?

I am writing an application in C++ which will send a message to an application written in Delphi. This is my receiver app: When the button is clicked, Edit1.Text will be sent via ShellExecute() as a command line parameter to the sender app…
user10825637
1
vote
1 answer

Why the WM_COPYDATA message is not being received when a data payload is provided?

I have a pretty well-known setup for the inter-process data exchange using the (ugly) WM_COPYDATA message. It's not my decision, I have to support it in a legacy app. const uint WM_COPYDATA = 0x004A; [StructLayout(LayoutKind.Sequential)] struct…
dymanoid
  • 14,771
  • 4
  • 36
  • 64
1
vote
1 answer

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.
1
vote
0 answers

Procedure is exited upon marshalling a C struct received via WM_COPYDATA into a C# struct

Here is my problem. I am trying to Marshal a C struct into a C# struct. The C struct is sent from a C application to a C# application via a WM_COPYDATA message. Sending and acknowledging the message is not a problem and works perfectly fine. I run…
Xergz
  • 25
  • 4
1
vote
0 answers

Why dwData = new IntPtr(0) would work in WM_COPYDATA (c# visual studio 2015)

When I set up the COPYDATASTRUCT, I set { dwData = new IntPtr(0) } , and the sender would successfully send message to receiver. However, when I tried { dwData = new IntPtr(xxOtherNumbersxxx) } , it would not work. Can anyone explain to me what…
Curly
  • 539
  • 2
  • 7
  • 14