application messaging
-
I'm currently coding on a project where I need to post a user-defined message together with a LPCWSTR parameter. But I don't know how to achieve that coz you know, PostMessage() only provides parameters typed as WPARAM and LPARAM. Anyone could help? Many thx in advance.
-
I'm currently coding on a project where I need to post a user-defined message together with a LPCWSTR parameter. But I don't know how to achieve that coz you know, PostMessage() only provides parameters typed as WPARAM and LPARAM. Anyone could help? Many thx in advance.
-
-
but be aware that if your string is transient ((new'd and delete'd) or stack based), it'll possibly be corrupt at the other end if you PostMessage it ...
-
Let's hope both the sending and receiving end is in the same process-space.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
but be aware that if your string is transient ((new'd and delete'd) or stack based), it'll possibly be corrupt at the other end if you PostMessage it ...
barneyman wrote:
but be aware that if your string is transient ((new'd and delete'd) or stack based), it'll possibly be corrupt at the other end if you PostMessage it ...
How so? In order to pass strings from one thread to another using
PostMessage()
,new
anddelete
are highly recommended."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
-
barneyman wrote:
but be aware that if your string is transient ((new'd and delete'd) or stack based), it'll possibly be corrupt at the other end if you PostMessage it ...
How so? In order to pass strings from one thread to another using
PostMessage()
,new
anddelete
are highly recommended."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather