atl100: Added AtlComModuleGetClassObject implementation (based on AtlModuleGetClassObject).
This commit is contained in:
parent
7b2d297d3e
commit
7d3046cd02
|
@ -303,6 +303,34 @@ void WINAPI AtlWinModuleAddCreateWndData(_ATL_WIN_MODULE *pM, _AtlCreateWndData
|
||||||
LeaveCriticalSection(&pM->m_csWindowCreate);
|
LeaveCriticalSection(&pM->m_csWindowCreate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* AtlComModuleGetClassObject [atl100.15]
|
||||||
|
*/
|
||||||
|
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
_ATL_OBJMAP_ENTRY **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)->pCF)
|
||||||
|
hres = (*iter)->pfnGetClassObject((*iter)->pfnCreateInstance, &IID_IUnknown, (void**)&(*iter)->pCF);
|
||||||
|
if((*iter)->pCF)
|
||||||
|
hres = IUnknown_QueryInterface((*iter)->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;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlRegisterClassCategoriesHelper [atl100.49]
|
* AtlRegisterClassCategoriesHelper [atl100.49]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
12 stdcall AtlFreeMarshalStream(ptr)
|
12 stdcall AtlFreeMarshalStream(ptr)
|
||||||
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
|
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
|
||||||
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
|
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
|
||||||
15 stub AtlComModuleGetClassObject
|
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
|
||||||
17 stub AtlComModuleRegisterClassObjects
|
17 stub AtlComModuleRegisterClassObjects
|
||||||
20 stub AtlComModuleRevokeClassObjects
|
20 stub AtlComModuleRevokeClassObjects
|
||||||
22 stub AtlComModuleUnregisterServer
|
22 stub AtlComModuleUnregisterServer
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
|
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
|
||||||
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
|
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
|
||||||
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
|
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
|
||||||
15 stub AtlComModuleGetClassObject
|
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) atl100.AtlComModuleGetClassObject
|
||||||
17 stub AtlComModuleRegisterClassObjects
|
17 stub AtlComModuleRegisterClassObjects
|
||||||
18 stub AtlComModuleRegisterServer(ptr long ptr)
|
18 stub AtlComModuleRegisterServer(ptr long ptr)
|
||||||
19 stub AtlRegisterTypeLib(ptr wstr)
|
19 stub AtlRegisterTypeLib(ptr wstr)
|
||||||
|
|
|
@ -89,7 +89,7 @@ typedef struct _ATL_OBJMAP_ENTRYW_TAG
|
||||||
_ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
|
_ATL_DESCRIPTIONFUNCW* pfnGetObjectDescription;
|
||||||
_ATL_CATMAPFUNC* pfnGetCategoryMap;
|
_ATL_CATMAPFUNC* pfnGetCategoryMap;
|
||||||
void (WINAPI *pfnObjectMain)(BOOL bStarting);
|
void (WINAPI *pfnObjectMain)(BOOL bStarting);
|
||||||
} _ATL_OBJMAP_ENTRYW;
|
} _ATL_OBJMAP_ENTRYW, _ATL_OBJMAP_ENTRY30, _ATL_OBJMAP_ENTRY;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _ATL_TERMFUNC_ELEM_TAG
|
typedef struct _ATL_TERMFUNC_ELEM_TAG
|
||||||
|
@ -183,6 +183,15 @@ typedef struct _ATL_WIN_MODULE70
|
||||||
CSimpleArray /* <ATOM> */ m_rgWindowClassAtoms;
|
CSimpleArray /* <ATOM> */ m_rgWindowClassAtoms;
|
||||||
} _ATL_WIN_MODULE70;
|
} _ATL_WIN_MODULE70;
|
||||||
|
|
||||||
|
typedef struct _ATL_COM_MODULE70
|
||||||
|
{
|
||||||
|
UINT cbSize;
|
||||||
|
HINSTANCE m_hInstTypeLib;
|
||||||
|
_ATL_OBJMAP_ENTRY **m_ppAutoObjMapFirst;
|
||||||
|
_ATL_OBJMAP_ENTRY **m_ppAutoObjMapLast;
|
||||||
|
CComCriticalSection m_csObjMap;
|
||||||
|
} _ATL_COM_MODULE70, _ATL_COM_MODULE;
|
||||||
|
|
||||||
#if _ATL_VER >= _ATL_VER_70
|
#if _ATL_VER >= _ATL_VER_70
|
||||||
typedef _ATL_MODULE70 _ATL_MODULE;
|
typedef _ATL_MODULE70 _ATL_MODULE;
|
||||||
typedef _ATL_WIN_MODULE70 _ATL_WIN_MODULE;
|
typedef _ATL_WIN_MODULE70 _ATL_WIN_MODULE;
|
||||||
|
@ -231,5 +240,6 @@ HRESULT WINAPI AtlCreateRegistrar(IRegistrar**);
|
||||||
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*);
|
HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*);
|
||||||
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**);
|
HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**);
|
||||||
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL);
|
HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL);
|
||||||
|
HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**);
|
||||||
|
|
||||||
#endif /* __WINE_ATLBASE_H__ */
|
#endif /* __WINE_ATLBASE_H__ */
|
||||||
|
|
Loading…
Reference in New Issue