#endif
#include "wx/log.h"
-#include "wx/msw/ole/automtn.h"
-#include <windows.h>
-#include <ole2ver.h>
-#include <oleauto.h>
#include <math.h>
#include <time.h>
-#ifdef GetObject
-#undef GetObject
-#endif
+#include "wx/msw/ole/automtn.h"
+
+#include "wx/msw/private.h"
+
+#include <ole2ver.h>
+#include <oleauto.h>
// wrapper around BSTR type (by Vadim Zeitlin)
else if (type == "bool")
{
oleVariant.vt = VT_BOOL;
-#ifdef __WATCOMC__
+ // 'bool' required for VC++ 4 apparently
+#if defined(__WATCOMC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1000))
oleVariant.bool = variant.GetBool();
#else
oleVariant.boolVal = variant.GetBool();
case VT_BOOL:
{
-#ifdef __WATCOMC__
+#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC
+#ifndef HAVE_BOOL // Can't use bool operator if no native bool type
+ variant = (long) (oleVariant.bool != 0);
+#else
variant = (bool) (oleVariant.bool != 0);
+#endif
#else
variant = (bool) (oleVariant.boolVal != 0);
#endif