updated for version 7.1-282
diff --git a/src/if_ole.cpp b/src/if_ole.cpp
index fad2097..b2057f9 100644
--- a/src/if_ole.cpp
+++ b/src/if_ole.cpp
@@ -34,6 +34,12 @@
extern HWND vim_parent_hwnd;
}
+#if _MSC_VER < 1300
+/* Work around old versions of basetsd.h which wrongly declares
+ * UINT_PTR as unsigned long */
+# define UINT_PTR UINT
+#endif
+
#include "if_ole.h" // Interface definitions
#include "iid_ole.c" // UUID definitions (compile here)
@@ -107,7 +113,7 @@
STDMETHOD(SendKeys)(BSTR keys);
STDMETHOD(Eval)(BSTR expr, BSTR *result);
STDMETHOD(SetForeground)(void);
- STDMETHOD(GetHwnd)(UINT *result);
+ STDMETHOD(GetHwnd)(UINT_PTR *result);
private:
// Constructor is private - create using CVim::Create()
@@ -288,9 +294,9 @@
}
STDMETHODIMP
-CVim::GetHwnd(UINT *result)
+CVim::GetHwnd(UINT_PTR *result)
{
- *result = (UINT) s_hwnd;
+ *result = (UINT_PTR)s_hwnd;
return S_OK;
}