51

Can any body tell me what is the difference between regsvr32 and RegAsm? My Dll is in C#, so how can I import the classes to c++?

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Cute
  • 13,643
  • 36
  • 96
  • 112

1 Answers1

50

regsvr32 will load the library and try to call the DllRegisterServer() from that library. It doesn't care what DllRegisterServer() actually does - it just calls that function and checks the returned value. You use it to register COM servers in unmanaged DLLs. It can't generate a .tlb file.

regasm will register a COM-exposed .NET assembly as a COM server. You use it for .NET assemblies. It can generate a .tlb file given the assembly only - it inspects the type infromation stored in the assembly and includes the COM-exposed entities into the type library.

sharptooth
  • 167,383
  • 100
  • 513
  • 979
  • 2
    @Aamir: When I first tried to make a COM-exposed assembly and consume it from a VC++ application and make this application redistributable I had a similar set of question. The difference is that Stackoverflow.com was launched later. – sharptooth Jul 22 '09 at 07:11