Re: COM Errors not using ISupportErrorInfoImpl

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 09/07/04


Date: Tue, 7 Sep 2004 13:43:58 -0400


"Brian Muth" <bmuth@mvps.org> wrote in message
news:uU73cFQlEHA.1244@TK2MSFTNGP15.phx.gbl
> "Mitch Marcus" <mmarcus@book.com> wrote in message
> news:e7J9E2PlEHA.3428@TK2MSFTNGP11.phx.gbl...
>> What I wanted to do was to have one ATL class that gets instantiated
>> by two different interfaces. The reason for this is was to support
>> existing clients and provide an enhanced interface for new clients.
>> I figured I could have two interfaces to one class.
>
> You can certainly do exactly this with a single ATL class. You will
> need to manually define the second interface in your IDL, and add the
> interface to the multiple inheritance list, and your
> BEGIN_COM_MAP..END_COM_MAP, but that's about it. Define the
> methods/properties in your header file and then go to town and
> implement...

But beware multiple dual interfaces on the same object. See
http://www.mvps.org/vcfaq/com/9.htm

-- 
With best wishes,
    Igor Tandetnik
"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage


Relevant Pages

  • Re: Must TLB be distributed with app?
    ... "Brian Muth" wrote: ... My interfaces are dual actually. ... If I understand the matter correctly, clients that don't use IDispatch ...
    (microsoft.public.vc.atl)
  • Re: CORBA IDL versioning, evolution, backward compatibility
    ... Extend existing interfaces with new interfaces, ... New clients will use the ... real-life versioning requirements are not ... modifying a struct can have nasty cascading affects. ...
    (comp.object.corba)
  • Re: CORBA IDL versioning, evolution, backward compatibility
    ... Extend existing interfaces with new interfaces, ... New clients will use the ... that contains the old struct. ... typedef short ProductState; ...
    (comp.object.corba)
  • Re: What multi-tier components to use
    ... Enterprise Java Beans. ... Java Clients to be able to talk to a Java Service. ... even though I still had to rebuild the interfaces every ... if your client- and server-side interfaces are out of sync ...
    (borland.public.delphi.thirdpartytools.general)
  • Sink Implementation for dispInterfaces
    ... I have an Active X control that uses dispinterfaces for Source interfaces to ... Is this also proves that C++ clients can not ...
    (microsoft.public.vc.atl)