使用Registry中的DLL。 [英] Use DLL from Registry.

查看:80
本文介绍了使用Registry中的DLL。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建.dll文件,我在这样的项目中使用。

I created .dll file and i'm using in project like this.

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles         Button1.Click
        Dim variableName
        variableName = CreateObject("ClassLibrary1.Class1")

    End Sub



它工作正常但我需要在调用任何文件的上下文菜单时调用.dll文件。


It is working properly but i need to call .dll file when i invoked context menu on any files.

推荐答案

你应该只添加对DLL的引用到您的项目:

打开您的解决方案,并查看解决方案资源管理器。

打开项目ct分支,右键单击引用

从上下文菜单中选择添加引用...。

在(最终)出现的对话框中,使用浏览..按钮并找到DLL,或者如果DLL位于同一解决方案中的不同项目中,则选择左侧的项目选项卡。

选择DLL /程序集并使用添加按钮添加引用。

关闭对话框。

您可能需要在每个源文件中添加Imports语句,但是您应该能够使用这些类就好像它们是您自己的项目或.NET框架的一部分。
You should just add a reference to the DLL to your project:
Open your solution, and look at the Solution Explorer.
Open the project branch, and right click "References"
Select "Add reference..." from the context menu.
In the dialog that (eventually) appears, either use the "Browse.." button and locate the DLL, or select the "Projects" tab on the left if the DLL is in a different project in the same solution.
Select the DLL / assembly and use the "Add" button to add the reference.
Close the dialog.
You may need to add an "Imports" statement to each source file, but you should be able to use the classes as if they were part of your own project or the .NET framework.


这篇关于使用Registry中的DLL。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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