Pinvoke如何运作? [英] How does Pinvoke work?

查看:74
本文介绍了Pinvoke如何运作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了很多关于平台调用的内容并希望了解我的知识。

我认为:

1. Pinvoke包装任何Windows API,.dll文件。 />
2.然后我可以在我的C#程序中使用那些包装的API或.dll文件。

对吗?

I have read much about Platform Invoke and wanna check out my knowledge.
I think:
1. Pinvoke wraps any Windows API, .dll files.
2. Then i can use those wrapped APIs or .dll files in my C# program.
Right?

推荐答案

我已经解释了它是如何工作的,并为您提供了所有文档的链接。你为什么再次提出同样的问题?



1. P / Invoke是一种从托管(.NET)访问Windows(或任何其他)非托管代​​码的方法可以通过P / Invoke机制在.NET程序中使用任何Windows API。
I have explained how this works and given you links to all the documentation for it. Why are you asking the same question again?

1. P/Invoke is a way of accessing Windows (or any other) unmanaged code, from managed (.NET) applications.
2. You can use any Windows API in a .NET program via the P/Invoke mechanism.


这篇关于Pinvoke如何运作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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