I believe the following leads to a memory access violation error because a false parameter (fcopy) causes memory to be freed up for CComBSTR:
CComBSTR myCComBSTR; string strMyCComBSTR = string(_bstr_t(myCComBSTR, false));
However, I'm not quite sure why this is so, since the MSDN documentation says fcopy:
If false, the bstr argument is attached to the new object without copying by phone to SysAllocString.
My question is:
thank
Yes, this is a problem - and myCComBSTR, and a temporary attempt will try to free the line, as they both will think that they own it.
myCComBSTR
, fcopy false " , , ". , myCComBSTR, , , - fcopy false. . myCComBSTR - double free, undefined.
fcopy
false
Source: https://habr.com/ru/post/1757980/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1757975/repository-info-svn-integration-with-excel&usg=ALkJrhgzCGPJvXeIRdW_zvBp9uk-Cv5wKwHttpwebrequest / Httpwebresponse - number of redirects - httpwebrequestAre multiple indexes needed for multiple sentences? - mysqlparsing SOAP response using touchXML - problem - iphoneI am trying to extract every href link to an html page to evaluate w / nokogiri and xpath - ruby | fooobar.comДокументирование использования аннотаций EJB3 в базе кода - javaWhat is the difference between MSP430 and MSP430X? - embeddedHow to set up a GoogleLogin request authorization header using the new WCF REST HttpClient API - authenticationGet great node values in XML using XSL - xmlWhat does the client side javascript template platform offer? - javascriptAll Articles