+ Reply to Thread
Results 1 to 2 of 2

Thread: How to convert _bstr_t to CString?

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    46

    How to convert _bstr_t to CString?

    How to convert _bstr_t to CString?

    Thanks.

  2. #2
    Junior Member
    Join Date
    Feb 2012
    Posts
    48
    Example:

    Code:
    void StringConvertion()
    {
    	_bstr_t bstrValue = "Hello World!!!" ;
    
    	CString strValue ;
    
    	strValue.Format("%s", (LPCTSTR) bstrValue) ;
    
    
    	OutputDebugString(strValue.GetBuffer(0)) ;
    }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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