Commit fd625ddb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Added marshalling of IUnknown.

parent 05fffb15
...@@ -452,7 +452,9 @@ PSFacBuf_CreateProxy( ...@@ -452,7 +452,9 @@ PSFacBuf_CreateProxy(
LPPSFACTORYBUFFER iface, IUnknown* pUnkOuter, REFIID riid, LPPSFACTORYBUFFER iface, IUnknown* pUnkOuter, REFIID riid,
IRpcProxyBuffer **ppProxy, LPVOID *ppv IRpcProxyBuffer **ppProxy, LPVOID *ppv
) { ) {
if (IsEqualIID(&IID_IClassFactory,riid)) if (IsEqualIID(&IID_IClassFactory,riid) ||
IsEqualIID(&IID_IUnknown,riid)
)
return CFProxy_Construct(ppv,(LPVOID*)ppProxy); return CFProxy_Construct(ppv,(LPVOID*)ppProxy);
FIXME("proxying not implemented for (%s) yet!\n",debugstr_guid(riid)); FIXME("proxying not implemented for (%s) yet!\n",debugstr_guid(riid));
return E_FAIL; return E_FAIL;
...@@ -467,7 +469,9 @@ PSFacBuf_CreateStub( ...@@ -467,7 +469,9 @@ PSFacBuf_CreateStub(
TRACE("(%s,%p,%p)\n",debugstr_guid(riid),pUnkServer,ppStub); TRACE("(%s,%p,%p)\n",debugstr_guid(riid),pUnkServer,ppStub);
if (IsEqualIID(&IID_IClassFactory,riid)) { if (IsEqualIID(&IID_IClassFactory,riid) ||
IsEqualIID(&IID_IUnknown,riid)
) {
hres = CFStub_Construct(ppStub); hres = CFStub_Construct(ppStub);
if (!hres) if (!hres)
IRpcStubBuffer_Connect((*ppStub),pUnkServer); IRpcStubBuffer_Connect((*ppStub),pUnkServer);
...@@ -503,7 +507,11 @@ HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) ...@@ -503,7 +507,11 @@ HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
STUBMGR_Start(); STUBMGR_Start();
return S_OK; return S_OK;
} }
if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&IsEqualIID(iid,&IID_IClassFactory)) if (IsEqualIID(rclsid,&CLSID_DfMarshal)&&(
IsEqualIID(iid,&IID_IClassFactory) ||
IsEqualIID(iid,&IID_IUnknown)
)
)
return MARSHAL_GetStandardMarshalCF(ppv); return MARSHAL_GetStandardMarshalCF(ppv);
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
......
...@@ -436,6 +436,8 @@ marshall_param( ...@@ -436,6 +436,8 @@ marshall_param(
ITypeInfo_Release(tinfo2); ITypeInfo_Release(tinfo2);
return hres; return hres;
} }
case VT_UNKNOWN:
return _marshal_interface(buf,&IID_IUnknown,(LPUNKNOWN)*arg);
default: default:
ERR("Cannot marshal type %d\n",tdesc->vt); ERR("Cannot marshal type %d\n",tdesc->vt);
/*dump_ELEMDESC(elem);*/ /*dump_ELEMDESC(elem);*/
...@@ -887,7 +889,10 @@ stuballoc_param( ...@@ -887,7 +889,10 @@ stuballoc_param(
case VT_UNKNOWN: case VT_UNKNOWN:
/* FIXME: UNKNOWN is unknown ..., but allocate 4 byte for it */ /* FIXME: UNKNOWN is unknown ..., but allocate 4 byte for it */
*arg=(DWORD)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DWORD)); *arg=(DWORD)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DWORD));
return S_OK; hres = S_OK;
if (elem->u.paramdesc.wParamFlags & PARAMFLAG_FIN)
hres = _unmarshal_interface(buf,&IID_IUnknown,(LPUNKNOWN*)arg);
return hres;
case VT_VOID: case VT_VOID:
*arg = (DWORD)HeapAlloc(GetProcessHeap(),0,sizeof(LPVOID)); *arg = (DWORD)HeapAlloc(GetProcessHeap(),0,sizeof(LPVOID));
hres = S_OK; hres = S_OK;
...@@ -993,7 +998,7 @@ stubunalloc_param( ...@@ -993,7 +998,7 @@ stubunalloc_param(
case VT_UNKNOWN: case VT_UNKNOWN:
if (elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT) { if (elem->u.paramdesc.wParamFlags & PARAMFLAG_FOUT) {
FIXME("Marshaling back VT_UNKNOWN %lx\n",*arg); FIXME("Marshaling back VT_UNKNOWN %lx\n",*arg);
hres = xbuf_add(buf,(LPBYTE)*arg,sizeof(DWORD)); hres = _marshal_interface(buf,&IID_IUnknown,(LPUNKNOWN)*arg);
} }
HeapFree(GetProcessHeap(),0,(LPVOID)*arg); HeapFree(GetProcessHeap(),0,(LPVOID)*arg);
return hres; return hres;
......
...@@ -129,6 +129,9 @@ ...@@ -129,6 +129,9 @@
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\NumMethods] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\NumMethods]
@="3" @="3"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000000-0000-0000-C000-000000000046}\ProxyStubClsid32]
@="{00000320-0000-0000-C000-000000000046}"
# IClassFactory, standard interface for creating instances of classes. # IClassFactory, standard interface for creating instances of classes.
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00000001-0000-0000-C000-000000000046}]
@="IClassFactory" @="IClassFactory"
......
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