Commit 68a4c30e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

atl100: Added AtlComModuleRegisterClassObjects implementation (based on…

atl100: Added AtlComModuleRegisterClassObjects implementation (based on AtlModuleRegisterClassObjects).
parent ac15301b
......@@ -456,6 +456,38 @@ HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid,
}
/***********************************************************************
* AtlComModuleRegisterClassObjects [atl100.17]
*/
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD context, DWORD flags)
{
_ATL_OBJMAP_ENTRY **iter;
IUnknown *unk;
HRESULT hres;
TRACE("(%p %x %x)\n", module, context, flags);
if(!module)
return E_INVALIDARG;
for(iter = module->m_ppAutoObjMapFirst; iter < module->m_ppAutoObjMapLast; iter++) {
if(!(*iter)->pfnGetClassObject)
continue;
hres = (*iter)->pfnGetClassObject((*iter)->pfnCreateInstance, &IID_IUnknown, (void**)&unk);
if(FAILED(hres))
return hres;
hres = CoRegisterClassObject((*iter)->pclsid, unk, context, flags, &(*iter)->dwRegister);
IUnknown_Release(unk);
if(FAILED(hres))
return hres;
}
return S_OK;
}
/***********************************************************************
* AtlComModuleUnregisterServer [atl100.22]
*/
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
......
......@@ -4,7 +4,7 @@
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
17 stub AtlComModuleRegisterClassObjects
17 stdcall AtlComModuleRegisterClassObjects(ptr long long)
20 stub AtlComModuleRevokeClassObjects
22 stdcall AtlComModuleUnregisterServer(ptr long ptr)
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
......
......@@ -4,7 +4,7 @@
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) atl100.AtlComModuleGetClassObject
17 stub AtlComModuleRegisterClassObjects
17 stdcall AtlComModuleRegisterClassObjects(ptr long long) atl100.AtlComModuleRegisterClassObjects
18 stdcall AtlComModuleRegisterServer(ptr long ptr)
19 stdcall AtlRegisterTypeLib(ptr wstr)
20 stub AtlComModuleRevokeClassObjects
......
......@@ -255,6 +255,7 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**);
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE,LPCOLESTR);
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL);
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**);
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE*,DWORD,DWORD);
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE*,BOOL,const CLSID*);
BOOL WINAPI AtlWaitWithMessageLoop(HANDLE);
HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown*,GUID*,IID*,unsigned short*,unsigned short*);
......
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