Re: Different versions of an interface



<smveloso@xxxxxxxxx> wrote in message
news:1119299783.213547.95250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> I have the following problem: After creating a "wrapper" for a COM
> dll using the "Import Type Library" function on Delphi 6, I am unable
> to instantiate an object of a specific type. The type is a new version
> of an existing interface:
>
> The COM dll is CAPICOM.dll. The interface from which I must have an
> instance is "ISigner2", but all the methods provided in the wrapper
> return objects that are of type "ISigner".
>
> Is this a known problem ? Is there a workaround for this ?

Sounds like how backwards compatibility would have to work with
interfaces. They are _declared_ to return ISigner references and you
can't change that, but the object implementing the interface can
implement both interfaces. Just query the ISigner reference for the
ISigner2 interface.

Groetjes,
Maarten Wiltink


.



Relevant Pages

  • Re: How to instantiate a class?
    ... of the dll, ... reflection to identify and then instantiate the class. ... the dll to implement an interface. ... To instantiate the proper class, you need to use reflection to search for the typein their DLL that implementyour interface, and then instantiate that type. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to instantiate a class?
    ... of the dll, ... reflection to identify and then instantiate the class. ... the dll to implement an interface. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: FileNotFoundException
    ... > My program really only knows the interface, but I need to reference the ... Do I need to recompile my program? ... instantiate a class from some other DLL, that other DLL will have just need ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to instantiate a class?
    ... of the dll, ... reflection to identify and then instantiate the class. ... the dll to implement an interface. ... object obj = Activator.CreateInstance; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Properties Shared Amongst Objects
    ... The host can query my application for certain ... In that context one usually strives to provide a subsystem interface that reflects the invariants of the DLL subject matter. ... A some point the conversion may become so complex that one wants to deal with it explicitly within the DLL subject matter. ...
    (comp.object)