(Mike? Robert?,)
I am trying to understand what is failing in a piece of -out-of-process COM under Wine. Basically it is an ATL-based CreateInstance that is returning E_NOINTERFACE under Wine.
Below is a cut-down copy of the trace.
What I don't understand is which QueryInterface is being called. I don't totally understand what is going on in the marshalling etc. but from what I can see I expected to see ClientIdentity_QueryRef called and some sort of marshalling going on in the last stages.
Can anyone point me at which code is probably implementing the QueryInterface?
Basic code: rclsid = __uuidof(ACCPACSignonMgr) CoCreateInstance (rclsid, NULL, CLSCTX_ALL, __uuidof(IUnknown), &pIUnknown); OleRun (pIUnknown) pIUnknown->QueryInterface (getIID(), &m_pInterface) pIUnknown->Release
Problem: pIUnknown->QueryInterface returns E_NOINTERFACE The interface is provided by a an object running in a local server
Why don't I see a trace on ClientIdentity_QueryInterface?
Trace
0009:trace:ole:WINE_StringFromCLSID 0x455e78->{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:trace:ole:CoGetClassObject CLSID: {b6b35894-dd6f-11d3-84ac-00c04f0e1b46}, IID: {00000001-0000-0000-c000-000000000046} 0009:warn:ole:CoGetClassObject class {B6B35894-DD6F-11D3-84AC-00C04F0E1B46} not registered inproc 0009:trace:ole:create_marshalled_proxy rclsid={b6b35894-dd6f-11d3-84ac-00c04f0e1b46}, iid={00000001-0000-0000-c000-000000000046} 0009:trace:ole:WINE_StringFromCLSID 0x455e78->{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:trace:ole:create_marshalled_proxy waiting for \.\pipe{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:trace:ole:WINE_StringFromCLSID 0x455e78->{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:trace:ole:create_server activating local server 'L"G:\runtime\a4wsignonmgr.exe -Embedding"' for {B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0012:trace:ole:DllMain 0x3a0000 0x1 0x1 0009:trace:ole:create_marshalled_proxy waiting for \.\pipe{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:warn:ole:create_marshalled_proxy Could not open named pipe to broker \.\pipe{B6B35894-DD6F-11D3-84AC-00C04F0E1B46}, le is 2 0012:trace:ole:DllMain (0x5e0000,1,0x1) 0012:trace:ole:CoInitializeEx ((nil), 2) 0012:trace:ole:CoInitializeEx () - Initializing the COM libraries 0012:trace:ole:RunningObjectTableImpl_Initialize () 0012:trace:ole:COM_CreateApartment creating new apartment, model=2 0012:trace:ole:COM_CreateApartment Created apartment on OXID 1100000012 0012:trace:ole:WINE_StringFromCLSID 0x41f320->{A2086A6A-3F3E-457C-8102-A4F99AD7C2DA} 0012:trace:ole:CoRegisterClassObject ({b6b35894-dd6f-11d3-84ac-00c04f0e1b46},0x7fca0180,0x00000004,0x00000001,0x41f094) 0012:trace:ole:CoMarshalInterface (0x77e28e58, {00000001-0000-0000-c000-000000000046}, 0x7fca0180, 0, (nil), 1) 0012:trace:ole:CoGetStandardMarshal ({00000001-0000-0000-c000-000000000046},0x7fca0180,0,(nil),1,0x76fd60) 0012:trace:ole:CoMarshalInterface Using standard marshaling 0012:trace:ole:CoMarshalInterface Calling IMarshal::MarshalInterace 0012:trace:ole:StdMarshalImpl_MarshalInterface (...,{00000001-0000-0000-c000-000000000046},...) 0012:trace:ole:start_apartment_listener_thread apt->listenertid=0 0014:trace:ole:apartment_listener_thread Apartment listener thread starting on (\.\pipe\WINE_OLE_StubMgr_0000001100000012) 0012:trace:ole:CoGetPSClsid () riid={00000001-0000-0000-c000-000000000046}, pclsid=0x76fcf4 0012:trace:ole:WINE_StringFromCLSID 0x3e7df0->{00000001-0000-0000-C000-000000000046} 0012:trace:ole:__CLSIDFromStringA {00000320-0000-0000-C000-000000000046} -> 0x76fcf4 0012:trace:ole:CoGetPSClsid () Returning CLSID={00000320-0000-0000-c000-000000000046} 0012:trace:ole:WINE_StringFromCLSID 0x76fcf4->{00000320-0000-0000-C000-000000000046} 0012:trace:ole:CoGetClassObject CLSID: {00000320-0000-0000-c000-000000000046}, IID: {d5f569d0-593b-101a-b569-08002b2dbf7a} 0012:trace:ole:COMPOBJ_DLLList_Add 0012:trace:ole:PSFacBuf_CreateStub ({00000001-0000-0000-c000-000000000046},0x7fca0180,0x76fcec) 0012:fixme:ole:StdMarshalImpl_MarshalInterface table marshalling unimplemented 0012:trace:ole:get_stub_manager_from_object not found for object 0x7fca0180 0012:trace:ole:register_ifstub constructing new stub manager 0012:trace:ole:new_stub_manager Created new stub manager (oid=1) at 0x77e28c28 for object with IUnknown 0x7fca0180 0012:trace:ole:stub_manager_new_ifstub oid=1, stubbuffer=0x77e28f18, iptr=0x7fca0180, iid={00000001-0000-0000-c000-000000000046}, tablemarshal=TRUE 0012:trace:ole:stub_manager_int_release after 1 0015:trace:ole:local_server_thread Starting threader for {b6b35894-dd6f-11d3-84ac-00c04f0e1b46}. 0015:trace:ole:WINE_StringFromCLSID 0x77e28e80->{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0009:trace:ole:create_marshalled_proxy waiting for \.\pipe{B6B35894-DD6F-11D3-84AC-00C04F0E1B46} 0015:trace:ole:local_server_thread marshalling IClassFactory to client 0009:trace:ole:create_marshalled_proxy read marshal id from pipe 0009:trace:ole:create_marshalled_proxy unmarshalling classfactory 0009:trace:ole:CoUnmarshalInterface (0x77e5e780, {00000001-0000-0000-c000-000000000046}, 0x1c80f4dc) 0009:trace:ole:get_unmarshaler_from_stream Using standard unmarshaling 0009:trace:ole:StdMarshalImpl_UnmarshalInterface (...,{00000001-0000-0000-c000-000000000046},....) 0009:trace:ole:CoGetPSClsid () riid={00000001-0000-0000-c000-000000000046}, pclsid=0x1c80ef84 0009:trace:ole:WINE_StringFromCLSID 0x30070df0->{00000001-0000-0000-C000-000000000046} 0009:trace:ole:__CLSIDFromStringA {00000320-0000-0000-C000-000000000046} -> 0x1c80ef84 0009:trace:ole:CoGetPSClsid () Returning CLSID={00000320-0000-0000-c000-000000000046} 0009:trace:ole:WINE_StringFromCLSID 0x1c80ef84->{00000320-0000-0000-C000-000000000046} 0009:trace:ole:CoGetClassObject CLSID: {00000320-0000-0000-c000-000000000046}, IID: {d5f569d0-593b-101a-b569-08002b2dbf7a} 0015:trace:ole:local_server_thread done marshalling IClassFactory 0009:trace:ole:COMPOBJ_DLLList_Add 0009:trace:ole:ClientIdentity_AddRef 0x77e62470 - before 0 0009:trace:ole:CFProxy_CreateInstance ((nil),{00000000-0000-0000-c000-000000000046},0x1c80f50c) 0009:trace:ole:PipeBuf_GetBuffer (0x1c80f488,{00000001-0000-0000-c000-000000000046}) 0009:trace:ole:PipeBuf_SendReceive () 0016:trace:ole:stub_dispatch_thread starting for apartment OXID 0000000800000009 0016:trace:ole:stub_manager_int_addref before 1 0016:trace:ole:get_stub_manager found 0x77e28c28 for oid 1 0016:trace:ole:stub_manager_int_release after 1 0016:trace:ole:CFStub_Invoke ->CreateInstance({00000000-0000-0000-c000-000000000046}) 0016:trace:ole:CoMarshalInterface (0x77e49320, {00000000-0000-0000-c000-000000000046}, 0x7fca0164, 0, (nil), 0) 0016:trace:ole:CoGetStandardMarshal ({00000000-0000-0000-c000-000000000046},0x7fca0164,0,(nil),0,0x5da8cfec) 0016:trace:ole:CoMarshalInterface Using standard marshaling 0016:trace:ole:CoMarshalInterface Calling IMarshal::MarshalInterace 0016:trace:ole:StdMarshalImpl_MarshalInterface (...,{00000000-0000-0000-c000-000000000046},...) 0016:trace:ole:start_apartment_listener_thread apt->listenertid=20 0016:trace:ole:CoGetPSClsid () riid={00000000-0000-0000-c000-000000000046}, pclsid=0x5da8cf80 0016:trace:ole:WINE_StringFromCLSID 0x5da8d100->{00000000-0000-0000-C000-000000000046} 0016:trace:ole:__CLSIDFromStringA {00000320-0000-0000-C000-000000000046} -> 0x5da8cf80 0016:trace:ole:CoGetPSClsid () Returning CLSID={00000320-0000-0000-c000-000000000046} 0016:trace:ole:WINE_StringFromCLSID 0x5da8cf80->{00000320-0000-0000-C000-000000000046} 0016:trace:ole:CoGetClassObject CLSID: {00000320-0000-0000-c000-000000000046}, IID: {d5f569d0-593b-101a-b569-08002b2dbf7a} 0016:trace:ole:COMPOBJ_DLLList_Add 0016:trace:ole:PSFacBuf_CreateStub ({00000000-0000-0000-c000-000000000046},0x7fca0164,0x5da8cf78) 0016:trace:ole:get_stub_manager_from_object not found for object 0x7fca0164 0016:trace:ole:register_ifstub constructing new stub manager 0016:trace:ole:new_stub_manager Created new stub manager (oid=2) at 0x77e4fd90 for object with IUnknown 0x7fca0164 0016:trace:ole:stub_manager_new_ifstub oid=2, stubbuffer=0x77e4ac98, iptr=0x7fca0164, iid={00000000-0000-0000-c000-000000000046}, tablemarshal=FALSE 0016:trace:ole:stub_manager_ext_addref added 1 refs to 0x77e4fd90 (oid 2), rc is now 1 0016:trace:ole:stub_manager_int_release after 1 0009:trace:ole:CFProxy_CreateInstance got 56 bytes data. 0009:trace:ole:CoUnmarshalInterface (0x77e5a3e8, {00000000-0000-0000-c000-000000000046}, 0x1c80f50c) 0009:trace:ole:get_unmarshaler_from_stream Using standard unmarshaling 0009:trace:ole:StdMarshalImpl_UnmarshalInterface (...,{00000000-0000-0000-c000-000000000046},....) 0009:trace:ole:CoGetPSClsid () riid={00000000-0000-0000-c000-000000000046}, pclsid=0x1c80f3b4 0009:trace:ole:WINE_StringFromCLSID 0x455cf0->{00000000-0000-0000-C000-000000000046} 0009:trace:ole:__CLSIDFromStringA {00000320-0000-0000-C000-000000000046} -> 0x1c80f3b4 0009:trace:ole:CoGetPSClsid () Returning CLSID={00000320-0000-0000-c000-000000000046} 0009:trace:ole:WINE_StringFromCLSID 0x1c80f3b4->{00000320-0000-0000-C000-000000000046} 0009:trace:ole:CoGetClassObject CLSID: {00000320-0000-0000-c000-000000000046}, IID: {d5f569d0-593b-101a-b569-08002b2dbf7a} 0009:trace:ole:COMPOBJ_DLLList_Add 0009:trace:ole:ClientIdentity_AddRef 0x77e625c0 - before 0 0009:trace:ole:ClientIdentity_Release 0x77e62470 - after 0 0009:trace:ole:PipeBuf_Release written disconnect packet 0016:trace:ole:COM_RpcReceive read disconnect header 0016:trace:ole:stub_manager_int_addref before 1 0016:trace:ole:get_stub_manager found 0x77e28c28 for oid 1 0016:trace:ole:stub_manager_ext_release removed 1 refs from 0x77e28c28 (oid 1), rc is now 4294967295 0016:trace:ole:stub_manager_int_release after 1 0009:trace:ole:CoCreateInstance Successfully returning 0x77e62678 for interface {00000000-0000-0000-c000-000000000046} of class {b6b35894-dd6f-11d3-84ac-00c04f0e1b46} 0009:trace:ole:OleRun Enter 0009:trace:ole:OleRun No runnable interface ???? Why is there no ClientIdentity_QueryInterface here? 0009:trace:ole:ClientIdentity_Release 0x77e625c0 - after 0
0009:trace:ole:PipeBuf_Release written disconnect packet 0016:trace:ole:COM_RpcReceive read disconnect header 0016:trace:ole:stub_manager_int_addref before 1 0016:trace:ole:get_stub_manager found 0x77e4fd90 for oid 2 0016:trace:ole:stub_manager_ext_release removed 1 refs from 0x77e4fd90 (oid 2), rc is now 0 0016:trace:ole:stub_manager_int_release after 1 0016:trace:ole:stub_manager_int_release after 0 0016:trace:ole:stub_manager_delete destroying 0x77e4fd90 (oid=2) 0016:trace:ole:stub_manager_delete_ifstub m=0x77e4fd90, m->oid=2, ipid={00000000-0000-0000-c000-000000000046}