tags:

views:

36

answers:

1

I have a .NET library visible in COM, and it's called from a vb6 application.

If I add some methods and release a new version (but don't erase or change signatures of existing methods), I would like being able to just install it in the production machine, and have it working. However, it seems that such approach doesn't work; I need to reompile the vb6 application.

Is there any way to achieve this?

+5  A: 

You can explicitly use the Guid attribute on your COM interfaces and classes and the DispId attribute on your methods, fields and properties:

[Guid("0E213759-1679-4CD1-8322-566CF76928EF")]
public class SampleClass
{
    [DispId(8)]
    public void MyMethod() {}
}
0xA3
Is this all I need? I have the Guid but not the DisId's. Will try this ASAP, thank you!
Jaime Pardos