#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
variant = (bool) (oleVariant.bool != 0);
#else
variant = (bool) (oleVariant.boolVal != 0);
{
// get the size of required buffer
UINT lenAnsi = strlen(sz);
+ #ifdef __MWERKS__
+ UINT lenWide = lenAnsi * 2 ;
+ #else
UINT lenWide = mbstowcs(NULL, sz, lenAnsi);
+ #endif
if ( lenWide > 0 ) {
m_wzBuf = new OLECHAR[lenWide + 1];