What's the Different from BSTR between LPWSTR!!!!

// assume string strValue =  'some chinese words'
USES_CONVERSION;
LPWSTR lpwsValue = A2W(strValue.c_str());
BSTR szValue = SysAllocString(lpwsValue);
nSize = SysStringLen(szValue);  
nSize1 = lstrlen(lpwsValue);
   
// szValue = ?
// nSize = ?;
// lpwsValue = ?
// nSize1 = ?
 
// delete[] lpwsValue;
//should we delete lpwsValue?No,absolutely No,if you do it, you just are an ideoit

SysFreeString(szValue);
-------------------------------------
Wanna know what ? is it,see you tomorrow.

posted on 2004-07-22 12:43  LeighSword  阅读(368)  评论(5编辑  收藏  举报

导航