Calling Regsvr32 on a .NET Assembly

  • Thread starter Thread starter Sahil Malik
  • Start date Start date
S

Sahil Malik

Fairly simple question !!!

The title says it all. But here is a further description -

I have a software that expects a COM DLL. Due to certain requirements we
have to create a .NET assembly instead.

I know we can do RegAsm, but the way we have to "load" this assembly into
another program is that ... the other program calls DllRegisterServer on it
directly - (regsvr32 equivalent).

So my question is - How can we fake a .NET assembly so that regsvr32.exe
thinks it is indeed a COM DLL and we use it VIA RegSvr32 and not RegAsm.exe.

Regards,

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik
 
If you have access to MC++ you could always write a small DLL that uses the
RegistrationServices class in its DllRegisterServer method, delegating to
the runtime to register the actual assembly.

And out of interest, how does it determine the CLSID of the object to
instantiate from the DLL you give it?
 
Back
Top