// Watcom C++ gives a linker error if this is compiled in.
// With Borland C++, all samples crash if this is compiled in.
-#if wxUSE_OLE &&!defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__) && !defined(__WXWINE__)
+#if wxUSE_OLE &&!defined(__WATCOMC__) && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
+#define _FORCENAMELESSUNION
#include "wx/log.h"
#include "wx/msw/ole/automtn.h"
#include "wx/msw/private.h"
if (FAILED(hr))
{
// ShowException(szMember, hr, NULL, 0);
+ delete[] argNames;
+ delete[] dispIds;
return FALSE;
}
{
// Again, reverse args
if (!ConvertVariantToOle(INVOKEARG((noArgs-1) - i), oleArgs[i]))
- return FALSE; // TODO: clean up memory at this point
+ {
+ delete[] argNames;
+ delete[] dispIds;
+ delete[] oleArgs;
+ return FALSE;
+ }
}
dispparams.rgdispidNamedArgs = dispIds + 1;