2013-12-05から1日間の記事一覧

BSTRからC文字列への変換

// BSTR to C String BSTR bstrStart; bstrStart = GetBSTR(); TCHAR szFinal[255]; // direct conversion from BSTR to LPCTSTR only works // in Unicode _stprintf(szFinal, _T("%s"), (LPCTSTR)bstrStart); AfxMessageBox(szFinal); _bstr_t bstrInterme…