Commit a54da42e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Added AtlModuleAddTermFunc implementation.

parent 83a1b978
......@@ -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)
......@@ -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;
}
......
......@@ -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);
......
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