Initialize all fields of EXCEPINFO object to avoid crashes later.
We could call SysFreeString() on uninitialized pointers if IDispatch::Invoke() failed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dc47e0adfd
commit
c50ab33de6
@ -139,7 +139,6 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
HRESULT hr;
|
||||
DISPPARAMS dispparams;
|
||||
unsigned int uiArgErr;
|
||||
EXCEPINFO excep;
|
||||
|
||||
// Get the IDs for the member and its arguments. GetIDsOfNames expects the
|
||||
// member name as the first name, followed by argument names (if any).
|
||||
@ -181,7 +180,8 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
dispparams.cArgs = noArgs;
|
||||
dispparams.cNamedArgs = namedArgCount;
|
||||
|
||||
excep.pfnDeferredFillIn = NULL;
|
||||
EXCEPINFO excep;
|
||||
wxZeroMemory(excep);
|
||||
|
||||
hr = ((IDispatch*)m_dispatchPtr)->Invoke(dispIds[0], IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
||||
(WORD)action, &dispparams, vReturnPtr, &excep, &uiArgErr);
|
||||
|
Loading…
Reference in New Issue
Block a user