◆◆◆◆◆BSTR怎么转换成字符串◆◆◆◆◆
BaoYu 2001-07-15 02:26:12 在中COM中。不支持CSTRING。所以我不能用它来作转换。
我想用MessageBox来显示一下传进来的参数:
STDMETHODIMP CAccessControl::IsUserAllowed(BSTR UserName, short reqFunction, VARIANT_BOOL *pbIsAllowed)
{
// TODO: Add your implementation code here
*pbIsAllowed=VARIANT_TRUE;
m_bstrUserName=UserName;
MessageBox(NULL,LPCTSTR(m_bstrUserName),"",0);
return S_OK;
}可是不能正常显示 。
显示为空。为何?
请手指点~~