Commit b7ec4de7 authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

atl: Implement AtlModuleAddCreateWndData and AtlModuleExtractCreateWndData.

parent 2d9fc5d7
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
40 stub AtlAxCreateControlEx 40 stub AtlAxCreateControlEx
41 stub AtlAxAttachControl 41 stub AtlAxAttachControl
42 stdcall AtlAxWinInit() 42 stdcall AtlAxWinInit()
43 stub AtlModuleAddCreateWndData 43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stub AtlModuleExtractCreateWndData 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 stub AtlAxGetControl
......
...@@ -423,3 +423,42 @@ void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric) ...@@ -423,3 +423,42 @@ void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY ); lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
ReleaseDC( NULL, dc ); ReleaseDC( NULL, dc );
} }
/***********************************************************************
* AtlModuleAddCreateWndData [ATL.@]
*/
void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, LPVOID pvObject)
{
TRACE("(%p, %p, %p)\n", pM, pData, pvObject);
pData->m_pThis = pvObject;
pData->m_dwThreadID = GetCurrentThreadId();
pData->m_pNext = pM->m_pCreateWndList;
pM->m_pCreateWndList = pData;
}
/***********************************************************************
* AtlModuleExtractCreateWndData [ATL.@]
*
* 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
*
*/
LPVOID WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
{
_AtlCreateWndData **ppData;
TRACE("(%p)\n", pM);
for(ppData = &pM->m_pCreateWndList; *ppData!=NULL; ppData = &(*ppData)->m_pNext)
{
if ((*ppData)->m_dwThreadID == GetCurrentThreadId())
{
_AtlCreateWndData *pData = *ppData;
*ppData = pData->m_pNext;
return pData->m_pThis;
}
}
return NULL;
}
...@@ -146,7 +146,9 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**); ...@@ -146,7 +146,9 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);
HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream); HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream);
HRESULT WINAPI AtlInternalQueryInterface(LPVOID pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, LPVOID* ppvObject); HRESULT WINAPI AtlInternalQueryInterface(LPVOID pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, LPVOID* ppvObject);
HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream); HRESULT WINAPI AtlMarshalPtrInProc(IUnknown *pUnk, const IID *iid, IStream **ppStream);
void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData, LPVOID pvObject);
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw); 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 AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE h);
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEA* pM, DWORD dwClsContext, DWORD dwFlags); HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEA* pM, DWORD dwClsContext, DWORD dwFlags);
HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID); HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID);
......
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