A
Andy Bates
Hi -
I have a C# .NET assembly that exposes a COM interface (basically has an
interface and class with Guid attributes).
If I compile this under VS.NET (with the "Register for COM Interop"
selected). Then I can import the TLB into C++ and use the component as a
standard COM component, it creates and I can call it's methods.
If however, I take the DLL and use REGASM to register the component. I
cannot use the component, the application reports that the class is not
registered (CreateInstance fails)!
Can anyone tell me what else I need to do in order to register the
component? VS.NET appears to be doing something else that is making the
component accessible!
I would also like to register the component from another .NET application
(without using REGASM). I believe the key to this is the RegistrationService
class, but I appear to be experiencing the same problem with this as the
REGASM problem above (i.e. class not registered)!
I have the following code, which incidently doesn't return any errors (or
throw any exceptions):
Assembly asm = Assembly.LoadFile (@"c:\temp\ImageConverter.dll");
RegistrationServices reg = new RegistrationServices ();
reg.RegisterAssembly (asm, 0);
Any help is greatly appreciated?
TIA
- Andy
I have a C# .NET assembly that exposes a COM interface (basically has an
interface and class with Guid attributes).
If I compile this under VS.NET (with the "Register for COM Interop"
selected). Then I can import the TLB into C++ and use the component as a
standard COM component, it creates and I can call it's methods.
If however, I take the DLL and use REGASM to register the component. I
cannot use the component, the application reports that the class is not
registered (CreateInstance fails)!
Can anyone tell me what else I need to do in order to register the
component? VS.NET appears to be doing something else that is making the
component accessible!
I would also like to register the component from another .NET application
(without using REGASM). I believe the key to this is the RegistrationService
class, but I appear to be experiencing the same problem with this as the
REGASM problem above (i.e. class not registered)!
I have the following code, which incidently doesn't return any errors (or
throw any exceptions):
Assembly asm = Assembly.LoadFile (@"c:\temp\ImageConverter.dll");
RegistrationServices reg = new RegistrationServices ();
reg.RegisterAssembly (asm, 0);
Any help is greatly appreciated?
TIA
- Andy