mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[ATL][ATL80][ATL100] Sync with Wine 3.0. CORE-14225
This commit is contained in:
parent
4c8b42be0f
commit
9c96b06291
2 changed files with 132 additions and 3 deletions
|
@ -481,6 +481,7 @@ void* WINAPI AtlWinModuleExtractCreateWndData(_ATL_WIN_MODULE *winmod)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlComModuleGetClassObject [atl100.15]
|
* AtlComModuleGetClassObject [atl100.15]
|
||||||
*/
|
*/
|
||||||
|
#if _ATL_VER < _ATL_VER_110
|
||||||
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid, REFIID riid, void **ppv)
|
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid, REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
_ATL_OBJMAP_ENTRY **iter;
|
_ATL_OBJMAP_ENTRY **iter;
|
||||||
|
@ -505,10 +506,37 @@ HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid,
|
||||||
WARN("Class %s not found\n", debugstr_guid(rclsid));
|
WARN("Class %s not found\n", debugstr_guid(rclsid));
|
||||||
return CLASS_E_CLASSNOTAVAILABLE;
|
return CLASS_E_CLASSNOTAVAILABLE;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
_ATL_OBJMAP_ENTRY_EX **iter;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p %s %s %p)\n", pm, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
|
if(!pm)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
for(iter = pm->m_ppAutoObjMapFirst; iter < pm->m_ppAutoObjMapLast; iter++) {
|
||||||
|
if(IsEqualCLSID((*iter)->pclsid, rclsid) && (*iter)->pfnGetClassObject) {
|
||||||
|
if(!(*iter)->pCache->pCF)
|
||||||
|
hres = (*iter)->pfnGetClassObject((*iter)->pfnCreateInstance, &IID_IUnknown, (void**)&(*iter)->pCache->pCF);
|
||||||
|
if((*iter)->pCache->pCF)
|
||||||
|
hres = IUnknown_QueryInterface((*iter)->pCache->pCF, riid, ppv);
|
||||||
|
TRACE("returning %p (%08x)\n", *ppv, hres);
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WARN("Class %s not found\n", debugstr_guid(rclsid));
|
||||||
|
return CLASS_E_CLASSNOTAVAILABLE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlComModuleRegisterClassObjects [atl100.17]
|
* AtlComModuleRegisterClassObjects [atl100.17]
|
||||||
*/
|
*/
|
||||||
|
#if _ATL_VER < _ATL_VER_110
|
||||||
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD context, DWORD flags)
|
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD context, DWORD flags)
|
||||||
{
|
{
|
||||||
_ATL_OBJMAP_ENTRY **iter;
|
_ATL_OBJMAP_ENTRY **iter;
|
||||||
|
@ -536,10 +564,40 @@ HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD c
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD context, DWORD flags)
|
||||||
|
{
|
||||||
|
_ATL_OBJMAP_ENTRY_EX **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)->pCache->dwRegister);
|
||||||
|
IUnknown_Release(unk);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlComModuleRevokeClassObjects [atl100.20]
|
* AtlComModuleRevokeClassObjects [atl100.20]
|
||||||
*/
|
*/
|
||||||
|
#if _ATL_VER < _ATL_VER_110
|
||||||
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
|
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
|
||||||
{
|
{
|
||||||
_ATL_OBJMAP_ENTRY **iter;
|
_ATL_OBJMAP_ENTRY **iter;
|
||||||
|
@ -558,10 +616,31 @@ HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
|
||||||
|
{
|
||||||
|
_ATL_OBJMAP_ENTRY_EX **iter;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", module);
|
||||||
|
|
||||||
|
if(!module)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
for(iter = module->m_ppAutoObjMapFirst; iter < module->m_ppAutoObjMapLast; iter++) {
|
||||||
|
hres = CoRevokeClassObject((*iter)->pCache->dwRegister);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlComModuleUnregisterServer [atl100.22]
|
* AtlComModuleUnregisterServer [atl100.22]
|
||||||
*/
|
*/
|
||||||
|
#if _ATL_VER < _ATL_VER_110
|
||||||
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
|
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
|
||||||
{
|
{
|
||||||
const struct _ATL_CATMAP_ENTRY *catmap;
|
const struct _ATL_CATMAP_ENTRY *catmap;
|
||||||
|
@ -610,6 +689,56 @@ HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeL
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid)
|
||||||
|
{
|
||||||
|
const struct _ATL_CATMAP_ENTRY *catmap;
|
||||||
|
_ATL_OBJMAP_ENTRY_EX **iter;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p %x %s)\n", mod, bRegTypeLib, debugstr_guid(clsid));
|
||||||
|
|
||||||
|
for(iter = mod->m_ppAutoObjMapFirst; iter < mod->m_ppAutoObjMapLast; iter++) {
|
||||||
|
if(!*iter || (clsid && !IsEqualCLSID((*iter)->pclsid, clsid)))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
TRACE("Unregistering clsid %s\n", debugstr_guid((*iter)->pclsid));
|
||||||
|
|
||||||
|
catmap = (*iter)->pfnGetCategoryMap();
|
||||||
|
if(catmap) {
|
||||||
|
hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, FALSE);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
hres = (*iter)->pfnUpdateRegistry(FALSE);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(bRegTypeLib) {
|
||||||
|
ITypeLib *typelib;
|
||||||
|
TLIBATTR *attr;
|
||||||
|
BSTR path;
|
||||||
|
|
||||||
|
hres = AtlLoadTypeLib(mod->m_hInstTypeLib, NULL, &path, &typelib);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
|
||||||
|
SysFreeString(path);
|
||||||
|
hres = ITypeLib_GetLibAttr(typelib, &attr);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
hres = UnRegisterTypeLib(&attr->guid, attr->wMajorVerNum, attr->wMinorVerNum, attr->lcid, attr->syskind);
|
||||||
|
ITypeLib_ReleaseTLibAttr(typelib, attr);
|
||||||
|
}
|
||||||
|
ITypeLib_Release(typelib);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@ reactos/dll/directx/wine/wined3d # Synced to WineStaging-2.16
|
||||||
reactos/dll/win32/activeds # Synced to WineStaging-2.9
|
reactos/dll/win32/activeds # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/actxprxy # Synced to WineStaging-2.9
|
reactos/dll/win32/actxprxy # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/advpack # Synced to WineStaging-2.9
|
reactos/dll/win32/advpack # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/atl # Synced to WineStaging-2.9
|
reactos/dll/win32/atl # Synced to Wine-3.0
|
||||||
reactos/dll/win32/atl80 # Synced to WineStaging-2.9
|
reactos/dll/win32/atl80 # Synced to Wine-3.0
|
||||||
reactos/dll/win32/atl100 # Synced to WineStaging-2.9
|
reactos/dll/win32/atl100 # Synced to Wine-3.0
|
||||||
reactos/dll/win32/avifil32 # Synced to WineStaging-2.9
|
reactos/dll/win32/avifil32 # Synced to WineStaging-2.9
|
||||||
reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23
|
reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/browseui # Out of sync
|
reactos/dll/win32/browseui # Out of sync
|
||||||
|
|
Loading…
Reference in a new issue