以下の内容はhttps://blog.systemjp.net/entry/2013/12/05/172011より取得しました。


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 bstrIntermediate(bstrStart);    // convert to
                                          // _bstr_t
  CString strFinal;

  // you have to go through _bstr_t to have it work in ANSI
  // and Unicode
  _stprintf(szFinal, _T("%s"), (LPCTSTR)bstrIntermediate);

  // Or, using MFC

  strFinal.Format(_T("%s"), (LPCTSTR)bstrIntermediate);

  AfxMessageBox(strFinal);

ネタ元




以上の内容はhttps://blog.systemjp.net/entry/2013/12/05/172011より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14