Commit 6ecdc5bb authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

atl: AtlAxGetHost and AtlAxGetControl implementation.

parent 26e6c13c
......@@ -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
......
......@@ -1261,3 +1261,47 @@ HWND WINAPI AtlAxCreateDialogW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPRO
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 );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment