Hi all ,
could anyone please help ,
I am keeping getting app crashes with my app
I suspect the following code
Could anyone have a look and help ,
In addition , could any one explain what are the diffrences between the _bstr_t constructor , and if I have to free them ?
Thanks very much
Code:BOOL CMSInterface::ConvertBSTRtoCharWithoutTerminator(BSTR i_sStr,char* o_Str,long *o_Length) { bool retVal = true; _bstr_t bstrObj(i_sStr, FALSE); *o_Length = bstrObj.length(); long lLen = WideCharToMultiByte(CP_ACP, 0, i_sStr,(*o_Length-2), o_Str, *o_Length, NULL, NULL); if(lLen) { *o_Length-= 2; retVal = true; } else { *o_Length =0; retVal = false; } return retVal; }



LinkBack URL
About LinkBacks


