Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between RegAsm.exe and regsvr32? How to generate a tlb file using regsvr32?

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++?

like image 738
Cute Avatar asked Jul 22 '09 06:07

Cute


People also ask

Where is Regasm located?

The file RegAsm.exe is located in a subfolder of C:\Windows or sometimes in a subfolder of the user's profile folder (for instance C:\Windows\Microsoft.NET\Framework\v4. 0.30319\).


1 Answers

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.

like image 177
sharptooth Avatar answered Sep 20 '22 13:09

sharptooth