Commit 8dc7a72a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

atl: Added locking to AtlModuleExtractCreateWndData.

parent dc160df8
......@@ -440,27 +440,32 @@ void WINAPI AtlModuleAddCreateWndData(_ATL_MODULEW *pM, _AtlCreateWndData *pData
/***********************************************************************
* AtlModuleExtractCreateWndData [ATL.@]
*
* NOTE: I failed to find any good description of this function.
* Tests show that this function extracts one of _AtlCreateWndData
* NOTE: Tests show that this function extracts one of _AtlCreateWndData
* records from the current thread from a list
*
*/
void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
{
_AtlCreateWndData **ppData;
void *ret = NULL;
TRACE("(%p)\n", pM);
EnterCriticalSection(&pM->m_csWindowCreate);
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;
ret = pData->m_pThis;
break;
}
}
return NULL;
LeaveCriticalSection(&pM->m_csWindowCreate);
return ret;
}
/***********************************************************************
......
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