Andrey Turkin : atl: AtlAxGetHost and AtlAxGetControl implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 13 09:24:27 CST 2006
Module: wine
Branch: master
Commit: 6ecdc5bbeb7f1b5f1b60ddf57b18e73d0a9b2b3a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6ecdc5bbeb7f1b5f1b60ddf57b18e73d0a9b2b3a
Author: Andrey Turkin <pancha at mail.nnov.ru>
Date: Sat Nov 11 00:03:32 2006 +0300
atl: AtlAxGetHost and AtlAxGetControl implementation.
---
dlls/atl/atl.spec | 4 ++--
dlls/atl/atl_ax.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/dlls/atl/atl.spec b/dlls/atl/atl.spec
index bfbaaec..6204c5d 100644
--- a/dlls/atl/atl.spec
+++ b/dlls/atl/atl.spec
@@ -38,8 +38,8 @@
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stub AtlModuleRegisterWndClassInfoA
-47 stub AtlAxGetControl
-48 stub AtlAxGetHost
+47 stdcall AtlAxGetControl(long ptr)
+48 stdcall AtlAxGetHost(long ptr)
49 stub AtlRegisterClassCategoriesHelper
50 stub AtlIPersistStreamInit_Load
51 stub AtlIPersistStreamInit_Save
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
index 2f7b1a3..7e6a348 100644
--- a/dlls/atl/atl_ax.c
+++ b/dlls/atl/atl_ax.c
@@ -1261,3 +1261,47 @@ HWND WINAPI AtlAxCreateDialogW(HINSTANCE
FreeResource ( hrsrc );
return res;
}
+
+/***********************************************************************
+ * AtlAxGetHost [ATL.@]
+ *
+ */
+HRESULT WINAPI AtlAxGetHost(HWND hWnd, IUnknown **pUnk)
+{
+ IOCS *This;
+
+ TRACE( "(%p, %p)\n", hWnd, pUnk );
+
+ *pUnk = NULL;
+
+ This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA );
+ if ( !This )
+ {
+ WARN("No container attached to %p\n", hWnd );
+ return E_FAIL;
+ }
+
+ return IOCS_QueryInterface( This, &IID_IUnknown, (void**) pUnk );
+}
+
+/***********************************************************************
+ * AtlAxGetControl [ATL.@]
+ *
+ */
+HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
+{
+ IOCS *This;
+
+ TRACE( "(%p, %p)\n", hWnd, pUnk );
+
+ *pUnk = NULL;
+
+ This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA );
+ if ( !This || !This->control )
+ {
+ WARN("No control attached to %p\n", hWnd );
+ return E_FAIL;
+ }
+
+ return IOleObject_QueryInterface( This->control, &IID_IUnknown, (void**) pUnk );
+}
More information about the wine-cvs
mailing list