Link to home
Start Free TrialLog in
Avatar of lcoolsingh
lcoolsingh

asked on

COM and Intterfaces

Hello all,

Why is that when an interface is published and registered in the regsitry, that on subsequent releases that interface cannot be modified in any way? E.g if i were to add a new virtual method at the end of the current methods listed in the intterface?

Thanks
Avatar of Deepu Abraham
Deepu Abraham
Flag of United States of America image

Hi,

Well you could very well add a new function in the interface.Only trouble is you need to re- compile the clients which are using that interface.

While designing the interface we should make sure that your interface should be furture proof.

If you understand the COM frame work, you will be able to connect it well.

Hope you got it !

Best Regards,
DeepuAbrahamK
Avatar of lcoolsingh
lcoolsingh

ASKER

I understand the COM framework, but say if you've added one method in your interface like this:

interface
{

  void print(int var);
};

You register this interface, and clients are using it. Six months down the line, you want to do this:

interface
{

  void print(const int var); //ADDED const
};

Why cant we do this? The interface is already registered on the client machine, so their is no need for registration.
ASKER CERTIFIED SOLUTION
Avatar of Deepu Abraham
Deepu Abraham
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial