Added AtlModuleAddTermFunc implementation.

This commit is contained in:
Jacek Caban 2005-10-06 12:29:02 +00:00 committed by Alexandre Julliard
parent 83a1b97888
commit a54da42ef3
3 changed files with 30 additions and 1 deletions

View File

@ -49,4 +49,4 @@
55 stub AtlModuleUnRegisterTypeLib
56 stub AtlModuleLoadTypeLib
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)
58 stub AtlModuleAddTermFunc
58 stdcall AtlModuleAddTermFunc(ptr ptr long)

View File

@ -91,7 +91,35 @@ HRESULT WINAPI AtlModuleInit(_ATL_MODULEA* pM, _ATL_OBJMAP_ENTRYA* p, HINSTANCE
HRESULT WINAPI AtlModuleTerm(_ATL_MODULEA* pM)
{
_ATL_TERMFUNC_ELEM *iter = pM->m_pTermFuncs, *tmp;
TRACE("(%p)\n", pM);
while(iter) {
iter->pFunc(iter->dw);
tmp = iter;
iter = iter->pNext;
HeapFree(GetProcessHeap(), 0, tmp);
}
HeapFree(GetProcessHeap(), 0, pM);
return S_OK;
}
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC pFunc, DWORD dw)
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("(%p %p %ld)\n", pM, pFunc, dw);
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
pM->m_pTermFuncs = termfunc_elem;
return S_OK;
}

View File

@ -145,6 +145,7 @@ HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID * iid, LPDW
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);
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC pFunc, DWORD dw);
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);