简体   繁体   English

在C#应用程序中使用C-DLL?

[英]Use C-DLL from within a C# application?

when a DLL comes with plain, undecorated C-functions, this DLL itself does not contain any information regarding parameters and return types of these functions. 当DLL带有普通的,未经修饰的C函数时,该DLL本身不包含有关这些函数的参数和返回类型的任何信息。

So when I want to use such a DLL out of a C# application: how/where do I define the types of these functions in my C#-code? 因此,当我想在C#应用程序之外使用此类DLL时:如何/在哪里定义我的C#代码中这些函数的类型?

Thanks 谢谢

If you want to use win32-Libraries just have a look at http://www.pinvoke.net/ , there are many samples of how to invoke win32 calls and how to handle datatypes/conversions. 如果要使用win32库, 请访问http://www.pinvoke.net/ ,其中有许多示例介绍如何调用win32调用以及如何处理数据类型/转换。 Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM