开发者

How to add a reference to native COM library in Visual Studio?

开发者 https://www.devze.com 2023-04-04 19:56 出处:网络
There is the Deploying COM Components with ClickOnce article in MSDN that says that native DLLs also could be referenced:

There is the Deploying COM Components with ClickOnce article in MSDN that says that native DLLs also could be referenced:

To add a native reference, use the Add Reference command, then browse to the manifest.

So, I'm trying to reference Skype4COM library. I've generated a manifest using mt tool. But when I try to reference this manifest, VS says me:

How to add a reference to native COM library in Visual Studio?

.

What am I understand or 开发者_如何学GoI'm doing wrong?


You are mixing up deploying with building. Adding a reference requires a type library or a DLL that contains a type library embedded inside the DLL. Skype4com.dll has one but it has a problem which prevents it from being added through the Add Reference dialog.

Use the Visual Studio Command Prompt from the Start + Programs menu. Use cd to navigate to the correct directory and type tlbimp skype4com.dll. You'll get a warning that you can ignore as long as you are running 32-bit code. Go back to VS and use Add Reference, Browse tab and select the generated SKYPE4COMLib.dll file.

0

精彩评论

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