The reason this happens is because you did not assign a GUID to your classes. Your class in .NET should be styled as follows:
[GuidAttribute("BA713700-522D-466e-8DD4-225884504678")] public class MyClass
This way, your class will be compiled with the same GUID attribute each time regasm starts. If you do not include this attribute, regasm will automatically assign a different GUID each time.
To be completely safe, your class must inherit from the interface
[Guid("9AC71CA7-6F82-44A3-9ABE-75354B514A46")] [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface IManager { [DispId(1)] void Display(ADODB.Recordset recordSet); [DispId(2)] void Close(); } [Guid("B9BB5B84-8FBD-4095-B846-EC072163ECD3")] [ClassInterface(ClassInterfaceType.None)] [ProgId("This.Is.GonnaBe.MyClass")] public class Manager : IManager { public void Display(ADODB.Recordset recordset) {
Angryhacker
source share