Can't pass IIDs properly across process boundaries 
Author Message
 Can't pass IIDs properly across process boundaries

(I'm retrying this question because my first post was bit too rambling.
I'm also getting desperate.)

In short, I can't seem to pass IIDs properly across interface boundaries.
I don't know if this is the cause or the symptom of the actual problem.

On my client side, I make a call to create an object like this

   #import "e:\users\oleary\testserver\testserver.tlb"

    void SomeFunction()
    {
    ...
       COSERVERINFO csi;
       csi.dwReserved1 = 0;
       csi.pwszName = ::SysAllocString(L"CAFFEINE");  // my machine
       csi.pAuthInfo = NULL;
       csi.dwReserved2 = 0;

       MULTI_QI mqi = {&IID_IJoeTest, NULL, 0};

        HRESULT hr = CoCreateInstanceEx(CLSID_JoeTest, NULL,
        CLSCTX_LOCAL_SERVER, &csi, 1, &mqi);
    ...
    }

On the client side, When I look at the IID value ("riid") in the de{*filter*},
I see the proper guid value for IJoeTest:

    {0x66f74b7e, 0x40b4, 0x11d1, {0xb3, 0xc1, 0x00, 0xa0, 0x24, 0x0f, 0x22,
0x72}};

Then I step into this call, another instance of Visual C++ fires up, and I
debug the server side.  However there, my IID value is totally different:

    {0x00000001, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x46}};

So my server returns E_NOINTERFACE

This has got to be some dumb mistake of mine, but I cannot figure it out.
All of the other parameters are passed just fine.  I have done this kind of
coding before, successfully firing up server EXEs with no problems.  For
some reason, If I request IUnknown, instead of IJoeTest, I DO get a valid
interface returned.  However, if I then attempt a QueryInterface for
IJoeTest, I get E_NOINTERFACE again because the IID doesn't get passed
properly

My server is the simplest of ATL server EXEs, with just a single coclass
("JoeTest") which is just a simple ATL object with only one function.  My
client is the simplest of MFC dialog based apps.

Someone please dope slap me and tell me what I'm doing wrong here here.

Thanks,

Joe O'



Mon, 27 Mar 2000 03:00:00 GMT  
 Can't pass IIDs properly across process boundaries

All this time I had not noticed that my post-build step (to automatically
build and register the proxy-stub DLL) had been removed.  I restored them
and rebuilt and everything works fine.

Thanks.

(I knew I was missing something really dumb...)



Quote:
> Have you registered the interface proxy/stub DLL?

> --
> Paul Mitchell
> AutoDealing Software Ltd.



> > (I'm retrying this question because my first post was bit too rambling.
> > I'm also getting desperate.)

> > In short, I can't seem to pass IIDs properly across interface
boundaries.

> > I don't know if this is the cause or the symptom of the actual problem.



Tue, 28 Mar 2000 03:00:00 GMT  
 Can't pass IIDs properly across process boundaries

Have you registered the interface proxy/stub DLL?

--
Paul Mitchell
AutoDealing Software Ltd.



Quote:
> (I'm retrying this question because my first post was bit too rambling.
> I'm also getting desperate.)

> In short, I can't seem to pass IIDs properly across interface boundaries.
> I don't know if this is the cause or the symptom of the actual problem.

> On my client side, I make a call to create an object like this

>    #import "e:\users\oleary\testserver\testserver.tlb"

>     void SomeFunction()
>     {
>     ...
>        COSERVERINFO csi;
>        csi.dwReserved1 = 0;
>        csi.pwszName = ::SysAllocString(L"CAFFEINE");  // my machine
>        csi.pAuthInfo = NULL;
>        csi.dwReserved2 = 0;

>        MULTI_QI mqi = {&IID_IJoeTest, NULL, 0};

>         HRESULT hr = CoCreateInstanceEx(CLSID_JoeTest, NULL,
>    CLSCTX_LOCAL_SERVER, &csi, 1, &mqi);
>     ...
>     }

> On the client side, When I look at the IID value ("riid") in the
de{*filter*},
> I see the proper guid value for IJoeTest:

>     {0x66f74b7e, 0x40b4, 0x11d1, {0xb3, 0xc1, 0x00, 0xa0, 0x24, 0x0f,
0x22,
> 0x72}};

> Then I step into this call, another instance of Visual C++ fires up, and
I
> debug the server side.  However there, my IID value is totally different:

>     {0x00000001, 0x0000, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
> 0x46}};

> So my server returns E_NOINTERFACE

> This has got to be some dumb mistake of mine, but I cannot figure it out.
> All of the other parameters are passed just fine.  I have done this kind
of
> coding before, successfully firing up server EXEs with no problems.  For
> some reason, If I request IUnknown, instead of IJoeTest, I DO get a valid
> interface returned.  However, if I then attempt a QueryInterface for
> IJoeTest, I get E_NOINTERFACE again because the IID doesn't get passed
> properly

> My server is the simplest of ATL server EXEs, with just a single coclass
> ("JoeTest") which is just a simple ATL object with only one function.  My
> client is the simplest of MFC dialog based apps.

> Someone please dope slap me and tell me what I'm doing wrong here here.

> Thanks,

> Joe O'



Tue, 28 Mar 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Can't pass IIDs properly across process boundaries

2. Passing Socket handles across process boundaries??

3. IPicture across process boundaries

4. Throwing com exceptions across process boundaries...

5. IXMLDOMNodeList across process boundaries?

6. Connection Point Events Across Processes Boundaries?

7. Understanding reference counts on com objects passed across processes

8. Passing interface pointer across process space

9. Passing Arrays in ATL across an Exe(local process)

10. Passing Arrays in ATL across an Exe(local process)

11. _com_error thrown across machine boundaries

12. Exceptions Across DLL Boundaries?

 

 
Powered by phpBB® Forum Software