如何从VB.Net中的dll调用参数化函数

时间:2015-12-14 11:34:29

标签: vb.net dll dllimport visual-c++-2008

我有visual c ++ .dll文件,我在VB.Net项目中添加了它作为参考。这创建了Interop.mydlllib.dll

现在我想在我的一个函数中使用来自dll的三个参数的函数。

如何在我的VB.Net函数中调用这个VC ++ dll函数。

我对VB.Net很新,所以任何帮助都表示赞赏...... :)

(我在互联网上搜索并尝试了那里建议的方式......但仍然错误...... :()

1 个答案:

答案 0 :(得分:0)

If you've referenced a Dll inside a VB project, then you will simply need to call it from it's namespace.

I.e. inside the C++ project there will be something (Probably the application/dll name) that it will register itself under.

From here, you simply need to start typing for intellisense to kick in and you'll see the name of your Dll listed in the dropdown list. Select that name and you should see your function name that you'll be able to call.