开发者

accessing methods of a dll [closed]

开发者 https://www.devze.com 2023-01-21 13:58 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_高级运维 Closed 12 years ago.

how to access the methods of a dll in .net using c#


Include the dll in your references folder in your project.

Here is a good article on doing that: http://msdn.microsoft.com/en-us/library/wkze6zky%28VS.80%29.aspx


That depends on what kind of Dll you are talking about. If you are talking about .Net Dll's, that is, .Net assemblies without an entry point, then Abe's answer applies. If you are talking about unmanaged/native DLL's written in C, you should use the Dllimport attribute in defined in System.Runtime.InteropServices namespcae. This link might help you.


.net

  • load the Assembly using 'Assembly.Load' or adding a reference
  • use the Classes in the Assembly

unmanaged

  • Use DllImport
0

精彩评论

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