atl: Implement AtlModuleAddCreateWndData and AtlModuleExtractCreateWndData.

This commit is contained in:
Andrey Turkin 2006-10-30 18:55:05 +03:00 committed by Alexandre Julliard
parent 2d9fc5d7b5
commit b7ec4de7c6
3 changed files with 43 additions and 2 deletions

View File

@ -34,8 +34,8 @@
40 stub AtlAxCreateControlEx
41 stub AtlAxAttachControl
42 stdcall AtlAxWinInit()
43 stub AtlModuleAddCreateWndData
44 stub AtlModuleExtractCreateWndData
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stub AtlModuleRegisterWndClassInfoA
47 stub AtlAxGetControl

View File

@ -423,3 +423,42 @@ void WINAPI AtlPixelToHiMetric(const SIZEL* lpPix, SIZEL* lpHiMetric)
lpHiMetric->cy = 100 * lpPix->cy / GetDeviceCaps( dc, LOGPIXELSY );
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;
}

View File

@ -146,7 +146,9 @@ HRESULT WINAPI AtlAxCreateControl(LPCOLESTR,HWND,IStream*,IUnknown**);
HRESULT WINAPI AtlFreeMarshalStream(IStream *pStream);
HRESULT WINAPI AtlInternalQueryInterface(LPVOID pThis, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, LPVOID* ppvObject);
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);
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 AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID);