atl: AtlAxGetHost and AtlAxGetControl implementation.
This commit is contained in:
parent
26e6c13c43
commit
6ecdc5bbeb
|
@ -38,8 +38,8 @@
|
||||||
44 stdcall AtlModuleExtractCreateWndData(ptr)
|
44 stdcall AtlModuleExtractCreateWndData(ptr)
|
||||||
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
|
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
|
||||||
46 stub AtlModuleRegisterWndClassInfoA
|
46 stub AtlModuleRegisterWndClassInfoA
|
||||||
47 stub AtlAxGetControl
|
47 stdcall AtlAxGetControl(long ptr)
|
||||||
48 stub AtlAxGetHost
|
48 stdcall AtlAxGetHost(long ptr)
|
||||||
49 stub AtlRegisterClassCategoriesHelper
|
49 stub AtlRegisterClassCategoriesHelper
|
||||||
50 stub AtlIPersistStreamInit_Load
|
50 stub AtlIPersistStreamInit_Load
|
||||||
51 stub AtlIPersistStreamInit_Save
|
51 stub AtlIPersistStreamInit_Save
|
||||||
|
|
|
@ -1261,3 +1261,47 @@ HWND WINAPI AtlAxCreateDialogW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPRO
|
||||||
FreeResource ( hrsrc );
|
FreeResource ( hrsrc );
|
||||||
return res;
|
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 );
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue