Retrieve data from WM_COPYDATA message

  • Thread starter Thread starter Sagaert Johan
  • Start date Start date
S

Sagaert Johan

Hi
How can i convert this into c# ?

How can i convert the pointer to a zero terminated sctring back to a C#
string object ?
Best practice to declare the PCOPYDATASTRUCT in c# ?

......
case WM_COPYDATA:
PCOPYDATASTRUCT poCopyData=(PCOPYDATASTRUCT)LParam;

printf( "Message from program(%u): %.*s\n", poCopyData->dwData,
poCopyData->cbData, poCopyData->lpData);

break;

Johan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top