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.
> >> >
> >> >
> >>
> >>
> >
> >
> >
>
>


.



Relevant Pages

  • Re: tlbexp command
    ... interfaces and library in that idl file. ... Of course, if you have a project without ATL support you have no ATL wizards, so you have to write code manually. ... the midl compiler parses IDL files and produces a tlb file which is your binary file representation of a type library. ...
    (microsoft.public.dotnet.languages.vc)
  • "Class not registered" error
    ... I created a set of .NET classes and interfaces inside a single .NET dll file ... and by means of attributes I also exposed them as COM classes and interfaces. ... the IDL content shown in the OLE/COM tool to an .IDL file. ... OLE/COM viewer compile-able I had to insert at the very beginning of the file ...
    (microsoft.public.dotnet.framework.interop)
  • Re: QueryInterface failure.
    ... Compile the common IDL file that containing all the shared interfaces ... Compile a DLL project that describes all the shared interfaces. ...
    (microsoft.public.vc.atl)
  • Re: how to import two .tlb uses same interface?
    ... The ATL Object classes in two ATL projects implements or uses same ... interfaces be defined in the shared IDL file. ... and add the interface idl file. ...
    (microsoft.public.vc.atl)
  • Re: importlib with shared interfaces
    ... My type library .idl file had an unneeded ... object browsers when viewing my COM server exe. ... All the attempts fail with 0x80008005 (server execution failed). ... from it using the defined interfaces. ...
    (microsoft.public.vc.atl)