如何添加非托管dll以显示在添加引用的COM选项卡 [英] How to add unmanaged dll to show up in Add Reference's COM tab

查看:287
本文介绍了如何添加非托管dll以显示在添加引用的COM选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正尝试在



Martyn


I am currently trying to use pHash.dll on http://phash.org

Unfortunately it was written in C++, I'd have to use DLLImport

But the problem I am having is how to register pHash.dll (compiled thru VS2010/C++)
I've tried to register using regsrv32 and have been fruitless giving an error message.



Now, How can i register pHash to show up in COM tab?

解决方案

The DLL in question exports flat APIs. The Add COM References Tab is for DLLs that expose COM objects. Instead of using Add Reference to refer to the DLL, you need to write a pinvoke declaration to let .NET know about your flat API.

Here's a helpful article:

http://msdn.microsoft.com/en-us/magazine/cc164123.aspx

Martyn

这篇关于如何添加非托管dll以显示在添加引用的COM选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆