winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
792 discussions
Start a n
N
ew thread
Andrey Turkin : atl: Implement AtlModuleLoadTypeLib.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 8141b99d119cbfb3e0b052dccfdc329b28b1be78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8141b99d119cbfb3e0b052dcc…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:06:53 2006 +0300 atl: Implement AtlModuleLoadTypeLib. --- dlls/atl/atl_main.c | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index e1cc058..1fac5b1 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -68,7 +68,7 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULE FIXME("Unknown structure version (size %i)\n",size); return E_INVALIDARG; } - + memset(pM,0,pM->cbSize); pM->cbSize = size; pM->m_hInst = h; @@ -97,11 +97,28 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULE return S_OK; } -HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, +HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib) { - FIXME("(%p, %s, %p, %p): stub\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib); - return E_FAIL; + HRESULT hRes; + OLECHAR path[MAX_PATH+8]; /* leave some space for index */ + + TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib); + + if (!pM) + return E_INVALIDARG; + + GetModuleFileNameW(pM->m_hInstTypeLib, path, MAX_PATH); + if (lpszIndex) + lstrcatW(path, lpszIndex); + + hRes = LoadTypeLib(path, ppTypeLib); + if (FAILED(hRes)) + return hRes; + + *pbstrPath = SysAllocString(path); + + return S_OK; } HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM) @@ -238,7 +255,7 @@ HRESULT WINAPI AtlInternalQueryInterface * AtlModuleRegisterServer [ATL.@] * */ -HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* clsid) +HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* clsid) { FIXME("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid)); return S_OK; @@ -362,7 +379,7 @@ HRESULT WINAPI AtlModuleUnregisterServer * * If the class name is NULL then it a class with a name of "ATLxxxxxxxx" is * registered, where the x's represent an unique value. - * + * */ ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc) { @@ -432,8 +449,8 @@ void WINAPI AtlModuleAddCreateWndData(_A * * NOTE: I failed to find any good description of this function. * Tests show that this function extracts one of _AtlCreateWndData - * records from the current thread from a list - * + * records from the current thread from a list + * */ LPVOID WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM) {
1
0
0
0
Andrey Turkin : atl: Fix incorrect prototypes.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 19c2b0bb6acb0c1ddd816da13be947874a58a659 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19c2b0bb6acb0c1ddd816da13…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:06:10 2006 +0300 atl: Fix incorrect prototypes. --- dlls/atl/atl_main.c | 14 +++++++------- dlls/atl/atlbase.h | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index 547a5cf..e1cc058 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -55,7 +55,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, #define ATLVer1Size 100 -HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE h) +HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h) { INT i; UINT size; @@ -63,7 +63,7 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULE FIXME("SEMI-STUB (%p %p %p)\n",pM,p,h); size = pM->cbSize; - if (size != sizeof(_ATL_MODULEA) && size != ATLVer1Size) + if (size != sizeof(_ATL_MODULEW) && size != ATLVer1Size) { FIXME("Unknown structure version (size %i)\n",size); return E_INVALIDARG; @@ -97,14 +97,14 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULE return S_OK; } -HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEA *pM, LPCOLESTR lpszIndex, +HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib) { FIXME("(%p, %s, %p, %p): stub\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib); return E_FAIL; } -HRESULT WINAPI AtlModuleTerm(_ATL_MODULEA* pM) +HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM) { _ATL_TERMFUNC_ELEM *iter = pM->m_pTermFuncs, *tmp; @@ -138,7 +138,7 @@ HRESULT WINAPI AtlModuleAddTermFunc(_ATL return S_OK; } -HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEA *pM, DWORD dwClsContext, +HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext, DWORD dwFlags) { HRESULT hRes = S_OK; @@ -152,7 +152,7 @@ HRESULT WINAPI AtlModuleRegisterClassObj while(pM->m_pObjMap[i].pclsid != NULL) { IUnknown* pUnknown; - _ATL_OBJMAP_ENTRYA *obj = &(pM->m_pObjMap[i]); + _ATL_OBJMAP_ENTRYW *obj = &(pM->m_pObjMap[i]); HRESULT rc; TRACE("Registering object %i\n",i); @@ -174,7 +174,7 @@ HRESULT WINAPI AtlModuleRegisterClassObj return hRes; } -HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEA* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID) +HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID) { FIXME("(%p, %i, %p) stub\n", pM, bUnRegTypeLib, pCLSID); return S_OK; diff --git a/dlls/atl/atlbase.h b/dlls/atl/atlbase.h index c0a556f..809a89f 100644 --- a/dlls/atl/atlbase.h +++ b/dlls/atl/atlbase.h @@ -151,13 +151,13 @@ HRESULT WINAPI AtlMarshalPtrInProc(IUnkn void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, LPVOID pvObject); HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw); LPVOID WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM); -HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE h); -HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEA* pM, DWORD dwClsContext, DWORD dwFlags); +HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h); +HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW* pM, DWORD dwClsContext, DWORD dwFlags); HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID); HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW* pM, const CLSID* pCLSID); HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg ); -HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEA* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID); -HRESULT WINAPI AtlModuleTerm(_ATL_MODULEA* pM); +HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID); +HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM); HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw); HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
1
0
0
0
Andrey Turkin : atl: AtlAxGetHost and AtlAxGetControl implementation.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 6ecdc5bbeb7f1b5f1b60ddf57b18e73d0a9b2b3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ecdc5bbeb7f1b5f1b60ddf57…
Author: Andrey Turkin <pancha(a)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 ); +}
1
0
0
0
Andrey Turkin : atl: Host component implementation: IOleControlSite.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 26e6c13c43c28e09711e00cfb42b7af88fe82cb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26e6c13c43c28e09711e00cfb…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:02:59 2006 +0300 atl: Host component implementation: IOleControlSite. --- dlls/atl/atl_ax.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 47c5778..2f7b1a3 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -46,6 +46,7 @@ typedef struct IOCS { const IOleContainerVtbl *lpOleContainerVtbl; const IOleInPlaceSiteWindowlessVtbl *lpOleInPlaceSiteWindowlessVtbl; const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl; + const IOleControlSiteVtbl *lpOleControlSiteVtbl; LONG ref; HWND hWnd; @@ -130,6 +131,7 @@ #define THIS2IOLECLIENTSITE(This) ((IOle #define THIS2IOLECONTAINER(This) ((IOleContainer*)&This->lpOleContainerVtbl) #define THIS2IOLEINPLACESITEWINDOWLESS(This) ((IOleInPlaceSiteWindowless*)&This->lpOleInPlaceSiteWindowlessVtbl) #define THIS2IOLEINPLACEFRAME(This) ((IOleInPlaceFrame*)&This->lpOleInPlaceFrameVtbl) +#define THIS2IOLECONTROLSITE(This) ((IOleControlSite*)&This->lpOleControlSiteVtbl) static HRESULT WINAPI IOCS_QueryInterface(IOCS *This, REFIID riid, void **ppv) { @@ -148,6 +150,9 @@ static HRESULT WINAPI IOCS_QueryInterfac } else if ( IsEqualIID( &IID_IOleInPlaceFrame, riid ) ) { *ppv = THIS2IOLEINPLACEFRAME(This); + } else if ( IsEqualIID( &IID_IOleControlSite, riid ) ) + { + *ppv = THIS2IOLECONTROLSITE(This); } if (*ppv) @@ -604,6 +609,61 @@ static HRESULT WINAPI OleInPlaceFrame_Tr #undef IFACE2THIS +/****** IOleControlSite *******/ +#define IFACE2THIS(iface) DEFINE_THIS(IOCS, OleControlSite, iface) +static HRESULT WINAPI OleControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_QueryInterface(This, riid, ppv); +} +static ULONG WINAPI OleControlSite_AddRef(IOleControlSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_AddRef(This); +} +static ULONG WINAPI OleControlSite_Release(IOleControlSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_Release(This); +} +static HRESULT WINAPI OleControlSite_OnControlInfoChanged( IOleControlSite* This) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_LockInPlaceActive( IOleControlSite* This, BOOL fLock) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_GetExtendedControl( IOleControlSite* This, IDispatch** ppDisp) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_TransformCoords( IOleControlSite* This, POINTL* pPtlHimetric, POINTF* pPtfContainer, DWORD dwFlags) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_TranslateAccelerator( IOleControlSite* This, MSG* pMsg, DWORD grfModifiers) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_OnFocus( IOleControlSite* This, BOOL fGotFocus) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleControlSite_ShowPropertyFrame( IOleControlSite* This) +{ + FIXME( "\n" ); + return E_NOTIMPL; +} +#undef IFACE2THIS + + static const IOleClientSiteVtbl OleClientSite_vtbl = { OleClientSite_QueryInterface, @@ -674,6 +734,19 @@ static const IOleInPlaceFrameVtbl OleInP OleInPlaceFrame_EnableModeless, OleInPlaceFrame_TranslateAccelerator }; +static const IOleControlSiteVtbl OleControlSite_vtbl = +{ + OleControlSite_QueryInterface, + OleControlSite_AddRef, + OleControlSite_Release, + OleControlSite_OnControlInfoChanged, + OleControlSite_LockInPlaceActive, + OleControlSite_GetExtendedControl, + OleControlSite_TransformCoords, + OleControlSite_TranslateAccelerator, + OleControlSite_OnFocus, + OleControlSite_ShowPropertyFrame +}; static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */ { @@ -828,6 +901,7 @@ static HRESULT IOCS_Create( HWND hWnd, I This->lpOleContainerVtbl = &OleContainer_vtbl; This->lpOleInPlaceSiteWindowlessVtbl = &OleInPlaceSiteWindowless_vtbl; This->lpOleInPlaceFrameVtbl = &OleInPlaceFrame_vtbl; + This->lpOleControlSiteVtbl = &OleControlSite_vtbl; This->ref = 1; This->OrigWndProc = NULL;
1
0
0
0
Andrey Turkin : atl: Host component implementation: IOleInPlaceFrame.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 566d5db2a21313c6bc329cb76b0e84aa64aabb7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=566d5db2a21313c6bc329cb76…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:02:30 2006 +0300 atl: Host component implementation: IOleInPlaceFrame. --- dlls/atl/atl_ax.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 143 insertions(+), 1 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 2dcd891..47c5778 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -45,6 +45,7 @@ typedef struct IOCS { const IOleClientSiteVtbl *lpOleClientSiteVtbl; const IOleContainerVtbl *lpOleContainerVtbl; const IOleInPlaceSiteWindowlessVtbl *lpOleInPlaceSiteWindowlessVtbl; + const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl; LONG ref; HWND hWnd; @@ -128,6 +129,7 @@ static ULONG WINAPI IOCS_AddRef(IOCS *Th #define THIS2IOLECLIENTSITE(This) ((IOleClientSite*)&This->lpOleClientSiteVtbl) #define THIS2IOLECONTAINER(This) ((IOleContainer*)&This->lpOleContainerVtbl) #define THIS2IOLEINPLACESITEWINDOWLESS(This) ((IOleInPlaceSiteWindowless*)&This->lpOleInPlaceSiteWindowlessVtbl) +#define THIS2IOLEINPLACEFRAME(This) ((IOleInPlaceFrame*)&This->lpOleInPlaceFrameVtbl) static HRESULT WINAPI IOCS_QueryInterface(IOCS *This, REFIID riid, void **ppv) { @@ -143,6 +145,9 @@ static HRESULT WINAPI IOCS_QueryInterfac } else if ( IsEqualIID( &IID_IOleInPlaceSite, riid ) || IsEqualIID( &IID_IOleInPlaceSiteEx, riid ) || IsEqualIID( &IID_IOleInPlaceSiteWindowless, riid ) ) { *ppv = THIS2IOLEINPLACESITEWINDOWLESS(This); + } else if ( IsEqualIID( &IID_IOleInPlaceFrame, riid ) ) + { + *ppv = THIS2IOLEINPLACEFRAME(This); } if (*ppv) @@ -340,7 +345,7 @@ static HRESULT WINAPI OleInPlaceSiteWind if ( ppFrame ) { - *ppFrame = NULL; + IOCS_QueryInterface( This, &IID_IOleInPlaceFrame, (void**) ppFrame ); } if ( ppDoc ) @@ -480,6 +485,124 @@ static HRESULT WINAPI OleInPlaceSiteWind FIXME("\n"); return E_NOTIMPL; } +#undef IFACE2THIS + + +/****** IOleInPlaceFrame *******/ +#define IFACE2THIS(iface) DEFINE_THIS(IOCS, OleInPlaceFrame, iface) +static HRESULT WINAPI OleInPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_QueryInterface(This, riid, ppv); +} +static ULONG WINAPI OleInPlaceFrame_AddRef(IOleInPlaceFrame *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_AddRef(This); +} +static ULONG WINAPI OleInPlaceFrame_Release(IOleInPlaceFrame *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_Release(This); +} +static HRESULT WINAPI OleInPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phWnd) +{ + IOCS *This = IFACE2THIS(iface); + + TRACE( "(%p,%p)\n", This, phWnd ); + + *phWnd = This->hWnd; + return S_OK; +} + +static HRESULT WINAPI OleInPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%d) - stub\n", This, fEnterMode ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p) - stub\n", This, lprectBorder ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p) - stub\n", This, pborderwidths ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p) - stub\n", This, pborderwidths ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p,%s) - stub\n", This, pActiveObject, debugstr_w(pszObjName) ); + return S_OK; +} + +static HRESULT WINAPI OleInPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p,%p) - stub\n", This, hmenuShared, lpMenuWidths ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p,%p,%p,%p) - stub\n", This, hmenuShared, holemenu, hwndActiveObject ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleInPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p, %p) - stub\n", This, hmenuShared ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p, %s) - stub\n", This, debugstr_w( pszStatusText ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p, %d) - stub\n", This, fEnable ); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p, %p, %x) - stub\n", This, lpmsg, wID ); + return E_NOTIMPL; +} +#undef IFACE2THIS + static const IOleClientSiteVtbl OleClientSite_vtbl = { @@ -533,6 +656,24 @@ static const IOleInPlaceSiteWindowlessVt OleInPlaceSiteWindowless_AdjustRect, OleInPlaceSiteWindowless_OnDefWindowMessage }; +static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl = +{ + OleInPlaceFrame_QueryInterface, + OleInPlaceFrame_AddRef, + OleInPlaceFrame_Release, + OleInPlaceFrame_GetWindow, + OleInPlaceFrame_ContextSensitiveHelp, + OleInPlaceFrame_GetBorder, + OleInPlaceFrame_RequestBorderSpace, + OleInPlaceFrame_SetBorderSpace, + OleInPlaceFrame_SetActiveObject, + OleInPlaceFrame_InsertMenus, + OleInPlaceFrame_SetMenu, + OleInPlaceFrame_RemoveMenus, + OleInPlaceFrame_SetStatusText, + OleInPlaceFrame_EnableModeless, + OleInPlaceFrame_TranslateAccelerator +}; static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */ { @@ -686,6 +827,7 @@ static HRESULT IOCS_Create( HWND hWnd, I This->lpOleClientSiteVtbl = &OleClientSite_vtbl; This->lpOleContainerVtbl = &OleContainer_vtbl; This->lpOleInPlaceSiteWindowlessVtbl = &OleInPlaceSiteWindowless_vtbl; + This->lpOleInPlaceFrameVtbl = &OleInPlaceFrame_vtbl; This->ref = 1; This->OrigWndProc = NULL;
1
0
0
0
Andrey Turkin : atl: Host component implementation: IOleInPlaceSiteWindowless.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 39b17cab1d654ab1d5a48fe74627a8596e040710 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39b17cab1d654ab1d5a48fe74…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:02:03 2006 +0300 atl: Host component implementation: IOleInPlaceSiteWindowless. --- dlls/atl/atl_ax.c | 306 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 303 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=39b17cab1d654ab1d5a48…
1
0
0
0
Andrey Turkin : atl: Host component implementation: IOleContainer.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 6366a1b054751b68da1c524b982c5fe67aad5a32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6366a1b054751b68da1c524b9…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:01:21 2006 +0300 atl: Host component implementation: IOleContainer. --- dlls/atl/atl_ax.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 58 insertions(+), 4 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 712cae0..fc7124d 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -43,6 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(atl); typedef struct IOCS { const IOleClientSiteVtbl *lpOleClientSiteVtbl; + const IOleContainerVtbl *lpOleContainerVtbl; LONG ref; HWND hWnd; @@ -71,13 +72,13 @@ static LRESULT CALLBACK AtlAxWin_wndproc /*********************************************************************** * AtlAxWinInit [ATL.@] - * Initializes the control-hosting code: registering the AtlAxWin, + * Initializes the control-hosting code: registering the AtlAxWin, * AtlAxWin7 and AtlAxWinLic7 window classes and some messages. * * RETURNS * TRUE or FALSE */ - + BOOL WINAPI AtlAxWinInit(void) { WNDCLASSEXW wcex; @@ -122,6 +123,7 @@ static ULONG WINAPI IOCS_AddRef(IOCS *Th } #define THIS2IOLECLIENTSITE(This) ((IOleClientSite*)&This->lpOleClientSiteVtbl) +#define THIS2IOLECONTAINER(This) ((IOleContainer*)&This->lpOleContainerVtbl) static HRESULT WINAPI IOCS_QueryInterface(IOCS *This, REFIID riid, void **ppv) { @@ -131,6 +133,9 @@ static HRESULT WINAPI IOCS_QueryInterfac || IsEqualIID( &IID_IOleClientSite, riid ) ) { *ppv = THIS2IOLECLIENTSITE(This); + } else if ( IsEqualIID( &IID_IOleContainer, riid ) ) + { + *ppv = THIS2IOLECONTAINER(This); } if (*ppv) @@ -162,6 +167,7 @@ static ULONG WINAPI IOCS_Release(IOCS *T #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) +/****** IOleClientSite *****/ #undef IFACE2THIS #define IFACE2THIS(iface) DEFINE_THIS(IOCS,OleClientSite, iface) static HRESULT WINAPI OleClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) @@ -195,8 +201,8 @@ static HRESULT WINAPI OleClientSite_GetM static HRESULT WINAPI OleClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) { IOCS *This = IFACE2THIS(iface); - FIXME( "(%p, %p)\n", This, ppContainer ); - return E_NOTIMPL; + TRACE( "(%p, %p)\n", This, ppContainer ); + return OleClientSite_QueryInterface( iface, &IID_IOleContainer, (void**)ppContainer ); } static HRESULT WINAPI OleClientSite_ShowObject(IOleClientSite *iface) { @@ -219,6 +225,45 @@ static HRESULT WINAPI OleClientSite_Requ #undef IFACE2THIS +/****** IOleContainer *****/ +#define IFACE2THIS(iface) DEFINE_THIS(IOCS, OleContainer, iface) +static HRESULT WINAPI OleContainer_QueryInterface( IOleContainer* iface, REFIID riid, void** ppv) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_QueryInterface( This, riid, ppv ); +} +static ULONG WINAPI OleContainer_AddRef(IOleContainer* iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_AddRef(This); +} +static ULONG WINAPI OleContainer_Release(IOleContainer* iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_Release(This); +} +static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer* iface, IBindCtx* pbc, + LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p,%p,%s,%p,%p) - stub\n", This, pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer* iface, DWORD grfFlags, IEnumUnknown** ppenum) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p, %u, %p) - stub\n", This, grfFlags, ppenum ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleContainer_LockContainer(IOleContainer* iface, BOOL fLock) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p, %s) - stub\n", This, fLock?"TRUE":"FALSE" ); + return E_NOTIMPL; +} +#undef IFACE2THIS + + static const IOleClientSiteVtbl OleClientSite_vtbl = { OleClientSite_QueryInterface, @@ -231,6 +276,14 @@ static const IOleClientSiteVtbl OleClien OleClientSite_OnShowWindow, OleClientSite_RequestNewObjectLayout }; +static const IOleContainerVtbl OleContainer_vtbl = { + OleContainer_QueryInterface, + OleContainer_AddRef, + OleContainer_Release, + OleContainer_ParseDisplayName, + OleContainer_EnumObjects, + OleContainer_LockContainer +}; static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */ { @@ -333,6 +386,7 @@ static HRESULT IOCS_Create( HWND hWnd, I return E_OUTOFMEMORY; This->lpOleClientSiteVtbl = &OleClientSite_vtbl; + This->lpOleContainerVtbl = &OleContainer_vtbl; This->ref = 1; This->OrigWndProc = NULL;
1
0
0
0
Andrey Turkin : atl: Implement AtlAxAttachControl.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 7c5f011c11c9b557670ff6822b059458d2a52196 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c5f011c11c9b557670ff6822…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:00:23 2006 +0300 atl: Implement AtlAxAttachControl. --- dlls/atl/atl.spec | 2 +- dlls/atl/atl_ax.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/atl/atl.spec b/dlls/atl/atl.spec index 12d5a19..bfbaaec 100644 --- a/dlls/atl/atl.spec +++ b/dlls/atl/atl.spec @@ -32,7 +32,7 @@ 38 stdcall AtlAxCreateDialogA(long str long ptr long) 39 stdcall AtlAxCreateControl(ptr ptr ptr ptr) 40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr) -41 stub AtlAxAttachControl +41 stdcall AtlAxAttachControl(ptr ptr ptr) 42 stdcall AtlAxWinInit() 43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr) 44 stdcall AtlModuleExtractCreateWndData(ptr) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index c2b5812..712cae0 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -470,8 +470,20 @@ HRESULT WINAPI AtlAxCreateControlEx(LPCO */ HRESULT WINAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUnkContainer) { - FIXME( "(%p %p %p) - stub\n", pControl, hWnd, ppUnkContainer ); - return E_NOTIMPL; + IOCS *pUnkContainer; + HRESULT hr; + + TRACE( "%p %p %p\n", pControl, hWnd, ppUnkContainer ); + + *ppUnkContainer = NULL; + + hr = IOCS_Create( hWnd, pControl, &pUnkContainer ); + if ( SUCCEEDED( hr ) ) + { + *ppUnkContainer = (IUnknown*) pUnkContainer; + } + + return hr; } /**********************************************************************
1
0
0
0
Andrey Turkin : alt: Host component implementation: IOleClientSite.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: e1d94f3633a6b6f591aa4068f142393915f6cb17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1d94f3633a6b6f591aa4068f…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Fri Nov 10 23:59:32 2006 +0300 alt: Host component implementation: IOleClientSite. --- dlls/atl/atl_ax.c | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 252 insertions(+), 0 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 6b9d9cb..c2b5812 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -41,6 +41,15 @@ #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(atl); +typedef struct IOCS { + const IOleClientSiteVtbl *lpOleClientSiteVtbl; + + LONG ref; + HWND hWnd; + IOleObject *control; + WNDPROC OrigWndProc; +} IOCS; + /********************************************************************** * AtlAxWin class window procedure */ @@ -99,6 +108,249 @@ BOOL WINAPI AtlAxWinInit(void) } /*********************************************************************** + * Atl container component implementation + */ + + +static ULONG WINAPI IOCS_AddRef(IOCS *This) +{ + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE( "(%p) : AddRef from %d\n", This, ref - 1 ); + + return ref; +} + +#define THIS2IOLECLIENTSITE(This) ((IOleClientSite*)&This->lpOleClientSiteVtbl) + +static HRESULT WINAPI IOCS_QueryInterface(IOCS *This, REFIID riid, void **ppv) +{ + *ppv = NULL; + + if ( IsEqualIID( &IID_IUnknown, riid ) + || IsEqualIID( &IID_IOleClientSite, riid ) ) + { + *ppv = THIS2IOLECLIENTSITE(This); + } + + if (*ppv) + { + IOCS_AddRef( This ); + return S_OK; + } + + WARN("unsupported interface %s\n", debugstr_guid( riid ) ); + *ppv = NULL; + return E_NOINTERFACE; +} + +static HRESULT IOCS_Detach( IOCS *This ); +static ULONG WINAPI IOCS_Release(IOCS *This) +{ + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE( "(%p) : ReleaseRef to %d\n", This, ref ); + + if (!ref) + { + IOCS_Detach( This ); + HeapFree( GetProcessHeap(), 0, This ); + } + + return ref; +} + +#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) + +#undef IFACE2THIS +#define IFACE2THIS(iface) DEFINE_THIS(IOCS,OleClientSite, iface) +static HRESULT WINAPI OleClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_QueryInterface(This, riid, ppv); +} +static ULONG WINAPI OleClientSite_AddRef(IOleClientSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_AddRef(This); +} +static ULONG WINAPI OleClientSite_Release(IOleClientSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + return IOCS_Release(This); +} +static HRESULT WINAPI OleClientSite_SaveObject(IOleClientSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p) - stub\n", This ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk) +{ + IOCS *This = IFACE2THIS(iface); + + FIXME( "(%p, 0x%x, 0x%x, %p)\n", This, dwAssign, dwWhichMoniker, ppmk ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p, %p)\n", This, ppContainer ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleClientSite_ShowObject(IOleClientSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p) - stub\n", This ); + return S_OK; +} +static HRESULT WINAPI OleClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p, %s) - stub\n", This, fShow ? "TRUE" : "FALSE" ); + return E_NOTIMPL; +} +static HRESULT WINAPI OleClientSite_RequestNewObjectLayout(IOleClientSite *iface) +{ + IOCS *This = IFACE2THIS(iface); + FIXME( "(%p) - stub\n", This ); + return E_NOTIMPL; +} +#undef IFACE2THIS + + + +static const IOleClientSiteVtbl OleClientSite_vtbl = { + OleClientSite_QueryInterface, + OleClientSite_AddRef, + OleClientSite_Release, + OleClientSite_SaveObject, + OleClientSite_GetMoniker, + OleClientSite_GetContainer, + OleClientSite_ShowObject, + OleClientSite_OnShowWindow, + OleClientSite_RequestNewObjectLayout +}; + +static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */ +{ + if ( This->hWnd ) + { + SetWindowLongPtrW( This->hWnd, GWLP_WNDPROC, (ULONG_PTR) This->OrigWndProc ); + SetWindowLongPtrW( This->hWnd, GWLP_USERDATA, (LONG_PTR) NULL ); + This->hWnd = NULL; + } + if ( This->control ) + { + IOleObject *control = This->control; + + This->control = NULL; + IOleObject_SetClientSite( control, NULL ); + IOleObject_Release( control ); + } + return S_OK; +} + +static void IOCS_OnSize( IOCS* This, LPCRECT rect ) +{ + SIZEL inPix, inHi; + + if ( !This->control ) + return; + + inPix.cx = rect->right - rect->left; + inPix.cy = rect->bottom - rect->top; + AtlPixelToHiMetric( &inPix, &inHi ); + IOleObject_SetExtent( This->control, DVASPECT_CONTENT, &inHi ); +} + +static LRESULT IOCS_OnWndProc( IOCS *This, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + WNDPROC OrigWndProc = This->OrigWndProc; + + switch( uMsg ) + { + case WM_DESTROY: + IOCS_Detach( This ); + break; + case WM_SIZE: + { + RECT r; + r.left = r.top = 0; + r.right = LOWORD( lParam ); + r.bottom = HIWORD( lParam ); + IOCS_OnSize( This, &r ); + } + break; + } + + return OrigWndProc( hWnd, uMsg, wParam, lParam ); +} + +static LRESULT CALLBACK AtlHost_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam ) +{ + IOCS *This = (IOCS*) GetWindowLongPtrW( hWnd, GWLP_USERDATA ); + return IOCS_OnWndProc( This, hWnd, wMsg, wParam, lParam ); +} + +static HRESULT IOCS_Attach( IOCS *This, HWND hWnd, IUnknown *pUnkControl ) /* subclass hWnd */ +{ + This->hWnd = hWnd; + IUnknown_QueryInterface( pUnkControl, &IID_IOleObject, (void**)&This->control ); + IOleObject_SetClientSite( This->control, THIS2IOLECLIENTSITE( This ) ); + This->OrigWndProc = (WNDPROC) GetWindowLongPtrW( This->hWnd, GWLP_WNDPROC ); + SetWindowLongPtrW( hWnd, GWLP_USERDATA, (ULONG_PTR) This ); + SetWindowLongPtrW( hWnd, GWLP_WNDPROC, (ULONG_PTR) AtlHost_wndproc ); + + return S_OK; +} + +static HRESULT IOCS_Init( IOCS *This ) +{ + RECT rect; + static const WCHAR AXWIN[] = {'A','X','W','I','N',0}; + + IOleObject_SetHostNames( This->control, AXWIN, AXWIN ); + + GetClientRect( This->hWnd, &rect ); + IOCS_OnSize( This, &rect ); + + return S_OK; +} + +/********************************************************************** + * Create new instance of Atl host component and attach it to window * + */ +static HRESULT IOCS_Create( HWND hWnd, IUnknown *pUnkControl, IOCS **ppSite ) +{ + HRESULT hr; + IOCS *This; + + *ppSite = NULL; + This = HeapAlloc(GetProcessHeap(), 0, sizeof(IOCS)); + + if (!This) + return E_OUTOFMEMORY; + + This->lpOleClientSiteVtbl = &OleClientSite_vtbl; + This->ref = 1; + + This->OrigWndProc = NULL; + This->hWnd = NULL; + + hr = IOCS_Attach( This, hWnd, pUnkControl ); + if ( SUCCEEDED( hr ) ) + hr = IOCS_Init( This ); + if ( SUCCEEDED( hr ) ) + *ppSite = This; + else + IOCS_Release( This ); + + return hr; +} + + +/*********************************************************************** * AtlAxCreateControl [ATL.@] */ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR lpszName, HWND hWnd,
1
0
0
0
Rob Shearman : ole32: Re-enable the code that unregisters interfaces with the RPC runtime.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: fff2d8e82b65b09ca183828a232da7626b6b6b56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fff2d8e82b65b09ca183828a2…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Nov 13 11:55:56 2006 +0000 ole32: Re-enable the code that unregisters interfaces with the RPC runtime. --- dlls/ole32/rpc.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 368a6ba..26a139e 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -669,12 +669,9 @@ void RPC_UnregisterInterface(REFIID riid { if (!--rif->refs) { -#if 0 /* this is a stub in builtin and spams the console with FIXME's */ - IID iid = *riid; /* RpcServerUnregisterIf doesn't take const IID */ - RpcServerUnregisterIf((RPC_IF_HANDLE)&rif->If, &iid, 0); + RpcServerUnregisterIf((RPC_IF_HANDLE)&rif->If, NULL, TRUE); list_remove(&rif->entry); HeapFree(GetProcessHeap(), 0, rif); -#endif } break; }
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200