1
votes

I have created a COM dll in C#.net, and calling a method of COM dll from VCPP code.

The creation of COM dll also result in a tlb file creation, after reading about it found that I need to register the tlb file using regasm to make a registry entry of it.

Now if I am running the application on a machine where Microsoft Visual Studio is not installed, then I wont be able to register the tlb file using regasm, also when I attempt to register the tlb file using regsvr32 its giving an error message.

Is there a work around for it?

1

1 Answers

0
votes

You don't need to register the .tlb file - you have to use regasm with /codebase parameter to register the COM .dll file. You need to run regasm on every machine where you want to use your COM .dll via COM. regasm is shipped and installed with .NET framework, so if it's not available it means you can't use your COM DLL since the latter requires .NET runtime anyway.

Also see this question.