Re: Why CoCreateInstanceEx only return default interface pointer from remote DCOM service?



Thanks, I add two lines about the another IDL file in dlldata.c, so the
proxy/stub DLL is right and it works.



EXTERN_PROXY_FILE( Shared)

REFERENCE_PROXY_FILE( Shared ),



"Alexander Nickolov" <agnickolov@xxxxxxxx> дÈëÓʼþ
news:uHYCaxkrFHA.3852@xxxxxxxxxxxxxxxxxxxxxxx
> Check under HKCR/Interfaces for your IIDs and verify they
> have proxy/stub CLSID registered there. This on both the
> client and the server machines.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@xxxxxxxx
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Daniels He" <heinsect@xxxxxxxx> wrote in message
> news:uTnhhhkrFHA.3852@xxxxxxxxxxxxxxxxxxxxxxx
> >
> > "Alexander Nickolov" <agnickolov@xxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ
> > :ufbolOYrFHA.908@xxxxxxxxxxxxxxxxxxxxxxx
> >> What errors does it return for the other interfaces? Most likely
> >> E_NOINTERFACE, but let's be sure. There are two distinct
> >> possibilities you have to eliminate first. Ensure your object actually
> >> exposes these interfaces - check your interface map. Then make
> >> sure you do have marshaling support registered for them - check
> >> that your interfaces are not declared in the library block, build
> >> and register your proxy/stub DLL.
> >>
> >
> > It is E_NOINTERFACE error. I check the interface map in
> > BEGIN_COM_MAP/END_COM_MAP and in idl file, all the interface is there.
The
> > proxy/stub DLL is built and registered OK.
> >
> > The IDL file in my ATL service uses another shared IDL file, which
defined
> > some shared interfaces, so in the ATL service's proxy/stub DLL makefile,
I
> > add the shared IDL's *_i.c and *_p.c files.
> >
> > All interfaces defined in shared IDL is mention in the LIB section, and
> > the
> > shared IDL file is compiled manually.
> >
> > The shared *.tlb file is importlib in my ATL service's IDL file's LIB
> > section.
> >
> >
> >> --
> >> =====================================
> >> Alexander Nickolov
> >> Microsoft MVP [VC], MCSD
> >> email: agnickolov@xxxxxxxx
> >> MVP VC FAQ: http://www.mvps.org/vcfaq
> >> =====================================
> >>
> >> "Daniels He" <heinsect@xxxxxxxx> wrote in message
> >> news:eI4aUnVrFHA.3452@xxxxxxxxxxxxxxxxxxxxxxx
> >> > One of my ATL project is a DCOM remote server run as service. After I
> >> > register proxy/stub dll in client and server machines and start the
> >> > service,
> >> > I can create DCOM remote object, but I can't query other interface
> >> > implemented by this object.
> >> >
> >> > I'm using VC6 + sp6. One of my ATL objects implement four interfaces
> >> > defined
> >> > by me, all interfaces are custom (not dual), and the thread model is
> > free.
> >> >
> >> > I have try this method:
> >> >
> >> > 1. _com_ptr_t<> wrapped class generated by "#import *.tlb" in my
client
> >> > application, which is a MFC MDI Application.
> >> >
> >> > The default interface is initialized correct (I have set
> > RemoteServerName
> >> > in
> >> > registry), I uses assign method between two xxxPtr variables, the
value
> > I
> >> > got is NULL.
> >> >
> >> > 2. CoCreateInstanceEx.
> >> >
> >> > Filled MULTI_QI struct with this four interfaces, only the default
> >> > interface
> >> > return Non-NULL value.
> >> >
> >> > 3. uses the template RemotePtr<> came from O'Reilly book <Learning
> > DCOM>,
> >> > and uses QueryInterface(...), I got a NULL;
> >> >
> >> > all the method return with error "0x8002802b, Element not found". I
> > can't
> >> > get many description about this.
> >> >
> >> >
> >>
> >>
> >
> >
> >
>
>


.