Hi, I'm having some problems regarding ITypeInfo/ITypeComp implementation.
IDispatch* pdisp; ITypeInfo* ptinfo;
HRESULT hr = pdisp->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeinfo); hr = ptinfo->GetTypeComp(&ptcomp);
pdisp is created from
hr = CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IDispatch, (void**)&pdisp);
That is, the server is an outprocess exe.
In this case marshalling of ITypeComp fails in first instance because
ITypeComp_fnQueryInterface (oleaut32\typelib.c) resolves on -> ITypeInfo_QueryInterface (oleaut32\typelib.c)
That is not considering IID_ITypeComp as a valid alternative(but it is)
if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid,&IID_ITypeInfo)|| IsEqualIID(riid,&IID_ITypeInfo2)) *ppvObject = This;
When I fixed this, I have a different problem now:
fixme:ole:DllGetClassObject CLSID: {00020425-0000-0000-C000-000000000046} IID: {D5F569D0-593B-101A-B569-08002B2DBF7A}
That is PSTypeComp to be marshalled asking for factory buffer IID_IPSFactoryBuffer.
I would like to follow up with someone (if available) just to be sure I'm not wasting time on the wrong track.
Thanks, Guillermo
Guillermo Winkler wrote:
Hi, I'm having some problems regarding ITypeInfo/ITypeComp implementation.
IDispatch* pdisp; ITypeInfo* ptinfo;
HRESULT hr = pdisp->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeinfo); hr = ptinfo->GetTypeComp(&ptcomp);
pdisp is created from
hr = CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IDispatch, (void**)&pdisp);
That is, the server is an outprocess exe.
In this case marshalling of ITypeComp fails in first instance because
ITypeComp_fnQueryInterface (oleaut32\typelib.c) resolves on -> ITypeInfo_QueryInterface (oleaut32\typelib.c)
That is not considering IID_ITypeComp as a valid alternative(but it is)
if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid,&IID_ITypeInfo)|| IsEqualIID(riid,&IID_ITypeInfo2)) *ppvObject = This;
When I fixed this, I have a different problem now:
fixme:ole:DllGetClassObject CLSID: {00020425-0000-0000-C000-000000000046} IID: {D5F569D0-593B-101A-B569-08002B2DBF7A}
That is PSTypeComp to be marshalled asking for factory buffer IID_IPSFactoryBuffer.
Yes, CLSID_PSTypeComp should be added to the cases in which OLEAUTPS_DllGetClassObject is called in dlls/oleaut32/oleaut.c:DllGetClassObject.
Robert Shearman wrote:
Yes, CLSID_PSTypeComp should be added to the cases in which OLEAUTPS_DllGetClassObject is called in dlls/oleaut32/oleaut.c:DllGetClassObject.
thanks, done that!
Now it's missing proxy/stub implementation in dlls/oleaut32/usrmarshal.c
The methods are already implemented in oleaut32_oaidl_p.c, so I guess I only need to wrap the call?
Regards, Guille