I wrote an application that puts in a message into MSMQ using C++ and
MFC. If I try to put a message called 'sample' I see that the body of
the
message in MSMQ would be set to: 's.a.m.p.l.e'.
On the other hand I have a C# application that reads the same message
queue and it expects the body format to be:
'<?xml version="1.0"? >..<string>sample</string>'
Because of this body format incompatibility, I am having trouble with
C# application not being able to read the C++ application's message.
Can someone suggest on how to modify the C#/C++ application to resolve
this issue.
Thanks,
IdleBrain
sloan - 22 Oct 2007 22:30 GMT
Follow this thread, and you're figure out some formatter stuff.
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_t
hread/thread/ea76de66f12fdb5e/fb5ce88a50c31d19?#fb5ce88a50c31d19
>I wrote an application that puts in a message into MSMQ using C++ and
> MFC. If I try to put a message called 'sample' I see that the body of
[quoted text clipped - 12 lines]
> Thanks,
> IdleBrain
John Vottero - 22 Oct 2007 22:32 GMT
>I wrote an application that puts in a message into MSMQ using C++ and
> MFC. If I try to put a message called 'sample' I see that the body of
[quoted text clipped - 9 lines]
> Can someone suggest on how to modify the C#/C++ application to resolve
> this issue.
You are using different Formatters. Set the MessageQueue.Formatter property
to be the same in both apps.
IdleBrain - 23 Oct 2007 14:40 GMT
Thanks for your help guys.
I started using the ActiveXMessageFormatter and XMLMessageFormatter in
my C# application to read either of the message queue formats and
donot have a problem now.
sloan - 23 Oct 2007 15:48 GMT
Thanks for posting the resolution.
> Thanks for your help guys.
>
> I started using the ActiveXMessageFormatter and XMLMessageFormatter in
> my C# application to read either of the message queue formats and
> donot have a problem now.