CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #3
    Join Date
    Aug 2002
    Location
    Kerala
    Posts
    1,183

    Re: MFC String: How to convert between a 'CString' and a 'BSTR'?

    Code:
    #include <comutil.h>
    
    BSTR bstr;
    SomeOLEFunction(bstr);
    CString cs(com_util::ConvertBSTRToString(bstr)); 
    AfxMessageBox(cs, MB_OK, 0);

    Last edited by Andreas Masur; July 24th, 2005 at 06:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured