Inheritance in ATL COM object... 
Author Message
 Inheritance in ATL COM object...

Ciao
I'm using the SOAP toolkit and need to implement an IHeaderHandler
interface.
I don't know how to do this. I mean, what i have to do is implementing
an interface that I already have. So what I did is
- adding a new ATL class, "hhandler"
- adding methods (with the signature of IHeaderHandler) so they
  appears in both idl and hhandler.h
- in hhandler.h:
  - modified the class declaration so it looks like:

    class headhandler :
//        public IDispatchImpl<Iheadhandler, &IID_Iheadhandler,
&LIBID_COMTEST3Lib>,
        public IHeaderHandler,
        public ISupportErrorInfo,
        public CComObjectRoot,
        public CComCoClass<headhandler,&CLSID_headhandler>
  [...]
    BEGIN_COM_MAP(headhandler)
    //     COM_INTERFACE_ENTRY(IDispatch)
        COM_INTERFACE_ENTRY(IHeaderHandler)
        COM_INTERFACE_ENTRY(Iheadhandler)
        COM_INTERFACE_ENTRY(ISupportErrorInfo)
    END_COM_MAP()

I've tried with various combinations of COM_INTERFACE_ENTRY
and derivation from IDispatchImpl and/or IHeaderHandler, but
everytime get tons of error messages.
Please someone could post me the correct steps to achieve it???
Thanks in advance,
  Mauro



Sat, 11 Oct 2003 17:01:46 GMT  
 Inheritance in ATL COM object...

Quote:
> I'm using the SOAP toolkit and need to implement an IHeaderHandler
> interface.

It sounds like IHeaderHandler should be defined by the SOAP toolkit (I don't
know, I've never used it). If so, you shouldn't add this interface to your
IDL, but should include from the toolkit's MIDL header file. You would be
replacing one definition of it with another and the compiler will get
confused.

Christian.



Sat, 11 Oct 2003 18:56:04 GMT  
 Inheritance in ATL COM object...

Quote:
> I've tried with various combinations of COM_INTERFACE_ENTRY
> and derivation from IDispatchImpl and/or IHeaderHandler, but
> everytime get tons of error messages.

Is it compiler/linker error? What are error messages?

Cheers,
Vadim.



Sun, 12 Oct 2003 00:11:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. passing COM object pointers to another COM object in ATL

2. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

3. ATL Com IDispatch Inheritance?

4. COM/ATL novice:passing object pointers through methods on a COM interface

5. LOOKING FOR: ATL Com+ C++ Object Pooled Connection Object (PAID JOB)

6. ATL COM OBjects as regular c++ objects

7. ATL object containing COM object

8. HOWTO set the property type of an ATL object to be another ATL object

9. Using a ATL Object in another ATL Object

10. Using a ATL Object in another ATL Object

11. Return a pointer to a nested COM object from a COM object method

12. Invoking COM object from COM object

 

 
Powered by phpBB® Forum Software