Sending a message

  • Thread starter Thread starter Jacek
  • Start date Start date
J

Jacek

Hello
I have to send a string between two applications a sender
(VB) and receiver (VC++) on local machine. Using
SendMessage I can not send a string, using messagequeue I
can send a string, but the receiver will not know that new
message have been posted (or there is a infinity loop
which checking all the time the new message was sent, but
there is waste of processor time). Is there any other
solution to do it? Or maybe I am wrong, and there is a
solution to get know receiver that new message were sent
to messagequeue?
Can someone help me? Thanks in advance.
brgds
Jacek
 
I think you should put a trigger on the queue where the
receiver should pick up the message.
A trigger is some kind of program which wakes on the
arrival of a new message.
Look for triggering in msmq. I did similar kind of thing
with IBM mq series.The trigger would invoke a com object
which does the processing of the object.
Another thing not connected with your question.
I keep getting junk emails stating that they contain the
latest security patches from microsoft.
I started getting these mails only after I posted my
question in this forums. do you have any idea of getting
rid of these messages? I get like 20 in an hour.
I appreciate your help in this regard. Let me know if you
have any questions on the triggering portion of the queues.
 
I'm not sure why you can't send a message with a string, look into using
WM_SETTEXT with SendMessage. Any string pointed to by the LPARAM will be
marshalled across process boundaries by the OS.
 
Default marshalling should be fine, you could always try to override it and
see but I do not see why defaults shouldnt work.
 
Back
Top