SF 3435567
Possibility to pass a NULL Dispatch pointer Fix a memory leak (detected with Glowcode) in Variant.cpp/zeroVariant function Variant.toString improvement to handle NULL cases Adds the error code to the message when "an unknown COM error has occurred" Added debug info to EventProxy advise registration failure message.
This commit is contained in:
@@ -342,8 +342,15 @@ static wchar_t* CreateErrorMsgFromResult(HRESULT inResult)
|
||||
msg = (wchar_t*) ::LocalAlloc(LPTR, bufferLength);
|
||||
wcscpy_s(msg, bufferLength, message_text);
|
||||
}
|
||||
// SF 3435567 add HRESULT to error message
|
||||
size_t bufferLength = (wcslen(msg) + 100) * sizeof(wchar_t);
|
||||
wchar_t* plus = (wchar_t*) ::LocalAlloc(LPTR, bufferLength);
|
||||
// Had to force this to wide/unicode. We must be missing a macro or setting somewhere
|
||||
wsprintfW(plus, L"%x / %s", inResult, msg);
|
||||
|
||||
return msg;
|
||||
::LocalFree(msg);
|
||||
|
||||
return plus;
|
||||
}
|
||||
|
||||
static wchar_t* CreateErrorMsgFromInfo(HRESULT inResult, EXCEPINFO* ioInfo,
|
||||
|
||||
Reference in New Issue
Block a user