-
BinaryMessageFormatter
Hi gurus,
I'm trying to use MSMQ in C# at the sending side and C++ at the receiving end. To start with, it looks good - I can put things on the queue and get them off the other end, of sorts.
My one main problem is that I don't seem to be able to get UNICODE off the queue - strings are always coming through as MBCS. I can cope with that, however.
I think this problem is also causing me a knock-on problem though, and that is proving a little more tricky to solve - my well-formed XML strings that I'm putting on the queue are actually being re-parsed into a string - so things like
Code:
<MyTag>Hello World</MyTag>
are actually coming out as
Code:
<?xml version="1.0"?><string><MyTag>Hello World</MyTag></string>
So I'm looking at the BinaryMessageFormatter class and I've told my queue to use it:
Code:
m_myQueue.Formatter = new BinaryMessageFormatter();
But now I'm not getting anything at the other end. I wonder if it's to do with loose coupling, but I can't find anything useful anywhere and I'm beginning to clutch at straws!
Any and all comments/suggestions/pointers gratefully received!
Toot
-
If you're interested
Naturally, given a sufficiently long day of ripping my hair out trying to find a way of doing this, it's actually hidden in the depths of MSDN already - see HOWTO: Create a custom message formatter using C# .NET.
Hope that prevents the need for someone else to waste two days :D
Toot