atl100: Added AtlUpdateRegistryFromResourceD implementation (based on AtlModuleUpdateRegistryFromResourceD).
This commit is contained in:
parent
9b4e92a6f1
commit
a97a667670
|
@ -7,7 +7,7 @@
|
|||
17 stub AtlComModuleRegisterClassObjects
|
||||
20 stub AtlComModuleRevokeClassObjects
|
||||
22 stub AtlComModuleUnregisterServer
|
||||
23 stub AtlUpdateRegistryFromResourceD
|
||||
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
|
||||
24 stub AtlWaitWithMessageLoop
|
||||
25 stub AtlSetErrorInfo
|
||||
26 stdcall AtlCreateTargetDC(long ptr)
|
||||
|
|
|
@ -702,3 +702,48 @@ HRESULT WINAPI AtlCreateRegistrar(IRegistrar **ret)
|
|||
*ret = ®istrar->IRegistrar_iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* AtlUpdateRegistryFromResourceD [atl100.@]
|
||||
*/
|
||||
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE inst, LPCOLESTR res,
|
||||
BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg)
|
||||
{
|
||||
const struct _ATL_REGMAP_ENTRY *iter;
|
||||
WCHAR module_name[MAX_PATH];
|
||||
IRegistrar *registrar;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR moduleW[] = {'M','O','D','U','L','E',0};
|
||||
static const WCHAR registryW[] = {'R','E','G','I','S','T','R','Y',0};
|
||||
|
||||
if(!GetModuleFileNameW(inst, module_name, MAX_PATH)) {
|
||||
FIXME("hinst %p: did not get module name\n", inst);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
TRACE("%p (%s), %s, %d, %p, %p\n", inst, debugstr_w(module_name),
|
||||
debugstr_w(res), bRegister, pMapEntries, pReg);
|
||||
|
||||
if(pReg) {
|
||||
registrar = pReg;
|
||||
}else {
|
||||
hres = AtlCreateRegistrar(®istrar);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
}
|
||||
|
||||
IRegistrar_AddReplacement(registrar, moduleW, module_name);
|
||||
|
||||
for (iter = pMapEntries; iter && iter->szKey; iter++)
|
||||
IRegistrar_AddReplacement(registrar, iter->szKey, iter->szData);
|
||||
|
||||
if(bRegister)
|
||||
hres = IRegistrar_ResourceRegisterSz(registrar, module_name, res, registryW);
|
||||
else
|
||||
hres = IRegistrar_ResourceUnregisterSz(registrar, module_name, res, registryW);
|
||||
|
||||
if(registrar != pReg)
|
||||
IRegistrar_Release(registrar);
|
||||
return hres;
|
||||
}
|
||||
|
|
|
@ -210,5 +210,6 @@ HRESULT WINAPI AtlModuleTerm(_ATL_MODULEW* pM);
|
|||
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw);
|
||||
HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk);
|
||||
HRESULT WINAPI AtlCreateRegistrar(IRegistrar**);
|
||||
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*);
|
||||
|
||||
#endif /* __WINE_ATLBASE_H__ */
|
||||
|
|
Loading…
Reference in New Issue