开发者

Using COM dll in VC++ dll

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 r开发者_开发百科egasm, also when I attempt to register the tlb file using regsvr32 its giving an error message.

Is there a work around for it?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜