X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2415cf6725d5cfb11f52d29e5d28dfdaa197b366..39d169639b01d4902583d4e541746a93a156ab78:/src/msw/ole/oleutils.cpp diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index 9235049632..0ba95fc800 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -148,6 +148,19 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole oleVariant.vt = VT_I4; oleVariant.lVal = variant.GetLong() ; } + // Original VC6 came with SDK too old to contain VARIANT::llVal declaration + // and there doesn't seem to be any way to test for it as Microsoft simply + // added it to the later version of oaidl.h without changing anything else. + // So assume it's not present for VC6, even though it might be if an + // updated SDK is used. In this case the user would need to disable this + // check himself. +#if wxUSE_LONGLONG && !defined(__VISUALC6__) + else if (type == wxT("longlong")) + { + oleVariant.vt = VT_I8; + oleVariant.llVal = variant.GetLongLong().GetValue(); + } +#endif else if (type == wxT("char")) { oleVariant.vt=VT_I1; // Signed Char @@ -350,6 +363,13 @@ wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) #endif // wxUSE_DATETIME break; + // See the comment before the __VISUALC6__ test above. +#if wxUSE_LONGLONG && !defined(__VISUALC6__) + case VT_I8: + variant = wxLongLong(oleVariant.llVal); + break; +#endif // wxUSE_LONGLONG + case VT_I4: variant = (long) oleVariant.lVal; break;