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_COPYDATA:
COPYDATASTRUCT* cds = (COPYDATASTRUCT*) lParam;
I dont know how to construct the COPYDATASTRUCT
, I have just put something in that seems to work. When debugging the WM_COPYDATA
case is executed, but again I dont know what to do with the COPYDATASTRUCT
.
I would like to send text between the two processes.
As you can probably tell I am just starting out, I am using GNU GCC Compiler in Code::Blocks, I am trying to avoid MFC and dependencies.
See Question&Answers more detail:os