locked
Adding new funtionality to existing activex control RRS feed

  • Question

  • I have added a new interface in a library to provide new functionality.
    The syntax is
    library
    {
    ... previous code...
    [uuid(..), hidden]
    dispinterface mynewinterface
    properties:
    method:
     [id(1)] void MyNewMethod(void);
    }

    coclass
    {
      dispinterface mynewinterface
    }

    };

    I use this method and it works fine. But now I want to a make a check whether the funcionality exists or not and that is possible i guess by checking whether the interface i.e. mynewinterface exists or not. How can I do it?

    Any help.
    I am using VS. NET

    Best Regards
    Thursday, April 13, 2006 5:55 AM

Answers

  • ActiveX is COM based.  I believe you treat rev'ing the interface and checking whether new functionality exists in the same way (add a new interface incrementing the version number and use QueryInterface to see if it's supported).

     

    Thanks,

    Ben

    Friday, April 14, 2006 1:00 AM

All replies

  • If you're adding to a control, you should be changing the GUID. 

    However, you could use reflection to see if the method exists.

     

    Thursday, April 13, 2006 6:01 AM
  • Well i am using C++ in VS.NET. So any help on it. As far as I know I cant use reflection in this case.


    Thursday, April 13, 2006 6:22 AM
  • OK, for some reason I thought you were asking in the VB forum.  Sorry

    Thursday, April 13, 2006 6:34 AM
  • I have an active control which is published. Now I want to add two new methods to this control to provide new functionality. Just like COM is the activex immutable ? If yes, how do I achieve it?
     I mean we declare new interfaces in COM when providing new functionality and QueryInterface determines whether the new functionality exists or not. How can I achieve this in activex control.

    Any help on it will be highly appreciated.

    Best Regards,
    Thursday, April 13, 2006 9:43 AM
  • ActiveX is COM based.  I believe you treat rev'ing the interface and checking whether new functionality exists in the same way (add a new interface incrementing the version number and use QueryInterface to see if it's supported).

     

    Thanks,

    Ben

    Friday, April 14, 2006 1:00 AM