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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…