[1/2] oledb32: Correct DataLinks interface for win64 (try 2)

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Sep 24 20:12:38 CDT 2013


Hi,


Changelog:
      oledb32: Correct DataLinks interface for win64


Best Regards
   Alistair Leslie-Hughes

-------------- next part --------------
>From bd751b93cb9996e302f02c8255b14b454eab3f39 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Mon, 16 Sep 2013 09:44:39 +1000
Subject: [PATCH] Correct DataLinks interface for win64
To: wine-patches <wine-patches at winehq.org>

---
 dlls/oledb32/dslocator.c |  4 ++--
 include/msdasc.idl       | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/oledb32/dslocator.c b/dlls/oledb32/dslocator.c
index dcc2fe3..aed3d6b 100644
--- a/dlls/oledb32/dslocator.c
+++ b/dlls/oledb32/dslocator.c
@@ -135,7 +135,7 @@ static HRESULT WINAPI dslocator_Invoke(IDataSourceLocator *iface, DISPID dispIdM
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI dslocator_get_hWnd(IDataSourceLocator *iface, LONG *phwndParent)
+static HRESULT WINAPI dslocator_get_hWnd(IDataSourceLocator *iface, COMPATIBLE_LONG *phwndParent)
 {
     DSLocatorImpl *This = impl_from_IDataSourceLocator(iface);
 
@@ -144,7 +144,7 @@ static HRESULT WINAPI dslocator_get_hWnd(IDataSourceLocator *iface, LONG *phwndP
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI dslocator_put_hWnd(IDataSourceLocator *iface, LONG phwndParent)
+static HRESULT WINAPI dslocator_put_hWnd(IDataSourceLocator *iface, COMPATIBLE_LONG phwndParent)
 {
     DSLocatorImpl *This = impl_from_IDataSourceLocator(iface);
 
diff --git a/include/msdasc.idl b/include/msdasc.idl
index 25610e5..a5fb984 100644
--- a/include/msdasc.idl
+++ b/include/msdasc.idl
@@ -26,6 +26,12 @@ import "oledb.idl";
 #define vi_progid(str)
 #endif
 
+cpp_quote("#ifdef _WIN64")
+    typedef LONGLONG COMPATIBLE_LONG;
+cpp_quote("#else")
+cpp_quote("    typedef LONG COMPATIBLE_LONG;")
+cpp_quote("#endif")
+
 [
     uuid(2206CEB0-19C1-11D1-89E0-00C04FD7A829),
     version(1.0)
@@ -56,10 +62,10 @@ library MSDASC
     interface IDataSourceLocator : IDispatch
     {
         [id(0x60020000), propget]
-        HRESULT hWnd([out, retval] long* phwndParent);
+        HRESULT hWnd([out, retval] COMPATIBLE_LONG* phwndParent);
 
         [id(0x60020000), propput]
-        HRESULT hWnd([in] long phwndParent);
+        HRESULT hWnd([in] COMPATIBLE_LONG phwndParent);
 
         [id(0x60020002), helpstring("PromptNew")]
         HRESULT PromptNew([out, retval] IDispatch** ppADOConnection);
-- 
1.8.1.2



More information about the wine-patches mailing list