I''m getting fed up with this now, I still cannot convert the WParam to a string. I really thought the code below would work :
string str = System.Runtime.InteropServices.Marshal.PtrToStringAuto( msg.WParam );
But just get a load of null characters ?
Has anybody converted WParam to a string, I know that we are passing a string into the WParam from our C++ application, surely you can pass more than integers into the WParam and LParam ?
Anybody any more ideas ?
Kind regards,
Steve
wndproc in c#
You could try writing a C++ managed unsafe function to read it, and calling it from your C# program. At least, you'd be sure that the message is indeed there.
EDIT: Sorry, I just realized that you had done this in C# already. In fact, now that I look at my first post, sorry for posting at all.
[edited by - cedricl on July 6, 2003 1:42:26 PM]
EDIT: Sorry, I just realized that you had done this in C# already. In fact, now that I look at my first post, sorry for posting at all.
[edited by - cedricl on July 6, 2003 1:42:26 PM]
It seems like the problem is that the string is in a seperate application''s address space, and *that* is why you can''t get to it.
So, why are you passing strings? If you know what types of information you are going to be getting, why not just pass int''s around?
So, why are you passing strings? If you know what types of information you are going to be getting, why not just pass int''s around?
quote:Original post by RomSteady
It seems like the problem is that the string is in a seperate application''s address space, and *that* is why you can''t get to it.
I concur. You might want to try this:
quote:
WM_COPYDATA Message
--------------------------------------------------------------------------------
An application sends the WM_COPYDATA message to pass data to another application.
Cédric
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement