Added AtlModuleAddTermFunc implementation.
This commit is contained in:
parent
83a1b97888
commit
a54da42ef3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue