还是报错:
_bstr_t a = pVal;
pw = (char*)a;
报错如下:
cannot convert parameter 2 from 'char *' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
_bstr_t b = digest;
pOutVal = (BSTR)b;
报错如下:
cannot convert from 'unsigned short *' to 'unsigned short ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
如果我改为:
_bstr_t b = digest;
*pOutVal = (BSTR)b;//则报警告:
warning C4800: 'unsigned char *' : forcing value to bool 'true' or 'false' (performance warning)
error C2664: '__thiscall ATL::CComBSTR::ATL::CComBSTR(int)' : cannot convert parameter 1 from 'unsigned char [16]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast