Hi,
I am trying to get a unicode message from a queue. I am using C++ and the C++ classes for MQSeries.
I have followed the samples from IBM, where they use char* as buffer to get the message from the queue. My problem is: unicode uses 2 bytes and the second byte is most of the time zero, which means null for the char*-buffer. When the read method reaches a null it stops reading and the size of the buffer is 1 char or so. I have tryied to use a wchar_t buffer, but then I got a compiler error.
So, the question is, does any one know how to read a unicode message from a queue?
Best regards, Anders
I am trying to get a unicode message from a queue. I am using C++ and the C++ classes for MQSeries.
I have followed the samples from IBM, where they use char* as buffer to get the message from the queue. My problem is: unicode uses 2 bytes and the second byte is most of the time zero, which means null for the char*-buffer. When the read method reaches a null it stops reading and the size of the buffer is 1 char or so. I have tryied to use a wchar_t buffer, but then I got a compiler error.
So, the question is, does any one know how to read a unicode message from a queue?
Best regards, Anders