CString转LPCWSTR

#include "comutil.h"
#pragma comment(lib, "comsupp.lib")
#pragma comment(lib, "comsuppw.lib")

_bstr_t bstr;
bstr = strPath;
ShellExecute(m_hWnd, "open", bstr, NULL, NULL, SW_SHOWNORMAL);

你可能感兴趣的:(CString转LPCWSTR)