locked
Why I cannot send msg to a MQ with both programs written in C++ API and C#? RRS feed

  • Question

  • Hi,

    I got a strange problem with MSMQ. I've created a MQ in a C# program and can send and receive messages, with methods of System.Messaging.MessageQueue. But when I try to send message to the MQ from a C++ program with API function MQSendMessage(), the message never appear in the queue. However, I noticed the message ID was increased, because when I sent another msg from the C# program again, its message ID is 2 or more than the last one.

    More interesting thing happened when I created a MQ in a C++ program with MQCreateQueue(). This time I was able to send msg from C++ program with API function MQSendMessage(), but the C# program failed. The message from C# program did not appear, but the message ID increased, just like the former case.

    Does anyone have any idea about this? Or does anyone tried to use MQ to communicate between C++ MFC program and C# program? Is there any example using the same MQ with different languages?

    Thanks!

    Friday, May 20, 2011 7:28 PM

All replies

  • Enable Negative Source Journaling to see why the message is being rejected.

    Cheers

    John

    Sunday, May 22, 2011 12:35 PM