1) Assuming you are doing so in a console application, you can also use the ATL conversion macros:
#include <atlbase.h>
#include <atlconv.h>
...
int main()
{
USES_CONVERSION; // this is necessary
BSTR strHello = SysAllocString(L"Hello");
std::cout<<OLE2CA(strHello)<<std::endl...
Try putting a
#define _WINNT_WIN32 0x500
before the other includes. This makes your program incompatible with Win95/98/NT 4.0 but exposes newly introduced APIs in Win2K. If this works, then this is the way to do it.
Cheers,
Andy
I am just inquisitive so asking this question. What value does the dataLength property of your message hold? If this is 1 then we have a problem.
How are you reading the message. I mean if you use MQFMT_STRING then there might be a problem. But if the dataLength property gives you correct...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.