开发者

Using "C" dll in C# [duplicate]

开发者 https://www.devze.com 2023-02-09 04:25 出处:网络
This question already has answers here: 开发者_JAVA百科 Closed 12 years ago. Possible Duplicate: How do I call unmanaged C/C++ code from a C# ASP.NET webpage
This question already has answers here: 开发者_JAVA百科 Closed 12 years ago.

Possible Duplicate:

How do I call unmanaged C/C++ code from a C# ASP.NET webpage

I have a dll file that is written in "C" language, i want to use it in C#. How can i do that?


You can use PInvoke

Platform Invocation Services (PInvoke) allows managed code to call unmanaged functions that are implemented in a DLL.

Here is a great tutorial by the NAG (Numerical Algorithms Group) group


You can do a DllImport in your C# code and then use PInvoke.

For your custom dll you can try this example answer on SO.

This a good website for reference for using windows dlls

0

精彩评论

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