X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5dcf05ae082a2da39102dec13ab3ad4c483221c8..b82827dd43caa489eade15cc02edef7fb79e8c20:/src/msw/ole/automtn.cpp diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index 44207bb733..e16be59a32 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -163,8 +163,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, for (i = 0; i < noArgs; i++) { // Again, reverse args - wxVariant& theVariant = INVOKEARG((noArgs-1) - i); - if (!ConvertVariantToOle(theVariant, oleArgs[i])) + if (!ConvertVariantToOle(INVOKEARG((noArgs-1) - i), oleArgs[i])) return FALSE; // TODO: clean up memory at this point } @@ -509,7 +508,11 @@ bool wxAutomationObject::ConvertVariantToOle(const wxVariant& variant, VARIANTAR else if (type == "bool") { oleVariant.vt = VT_BOOL; +#ifdef __WATCOMC__ + oleVariant.bool = variant.GetBool(); +#else oleVariant.boolVal = variant.GetBool(); +#endif } else if (type == "string") { @@ -633,7 +636,11 @@ bool wxAutomationObject::ConvertOleToVariant(const VARIANTARG& oleVariant, wxVar case VT_BOOL: { +#ifdef __WATCOMC__ + variant = (bool) (oleVariant.bool != 0); +#else variant = (bool) (oleVariant.boolVal != 0); +#endif break; } case VT_R8: