Commit 9da8128e authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

atl: Implement AtlComPtrAssign.

According to MSDN AtlModuleInit should initialize the modules critical sections.
parent 4d05f244
......@@ -22,7 +22,7 @@
27 stub AtlHiMetricToPixel
28 stub AtlPixelToHiMetric
29 stub AtlDevModeW2A
30 stub AtlComPtrAssign
30 stdcall AtlComPtrAssign(ptr ptr)
31 stub AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
34 stub AtlGetVersion
......
......@@ -73,6 +73,10 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE
pM->m_pObjMap = p;
pM->m_hHeap = GetProcessHeap();
InitializeCriticalSection(&pM->u.m_csTypeInfoHolder);
InitializeCriticalSection(&pM->m_csWindowCreate);
InitializeCriticalSection(&pM->m_csObjMap);
/* call mains */
i = 0;
if (pM->m_pObjMap != NULL && size > ATLVer1Size)
......@@ -181,6 +185,17 @@ BOOL WINAPI AtlAxWinInit(void)
}
IUnknown* WINAPI AtlComPtrAssign(IUnknown** pp, IUnknown *p)
{
TRACE("(%p %p)\n", pp, p);
if (p) IUnknown_AddRef(p);
if (*pp) IUnknown_Release(*pp);
*pp = p;
return p;
}
HRESULT WINAPI AtlInternalQueryInterface(LPVOID this, const _ATL_INTMAP_ENTRY* pEntries, REFIID iid, LPVOID* ppvObject)
{
int i = 0;
......
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