Code below shows how to convert CString to CComBSTR.
~ts
// CComBSTR.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include#include #include int _tmain(int argc, _TCHAR* argv[]) { CComBSTR szDbgMsg; CString sMsg; sMsg = _T("Hello world new"); sMsg.Format(_T("%s : %d"), sMsg, 12); //szDbgMsg = L"Hello world "; szDbgMsg = sMsg.GetBuffer(); CW2A printstr(szDbgMsg); std::wcout << ((CString)szDbgMsg).GetBuffer() << std::endl; std::wcout << sMsg.GetBuffer() << std::endl; return 0; }
~ts
Comments
you wrote the book in it or something. I think that you can do with a few pics to drive the message home a little bit, but instead of that,
this is great blog. A fantastic read. I'll definitely be back.
My website; raspberry ketone diet