Windows API 和 .net 语言 [英] Windows API and .net languages

查看:20
本文介绍了Windows API 和 .net 语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

人们总是告诉我,如果我正在做一些应该使用一些 Windows API 来完成任何进程级工作的应用程序,我必须使用 VC++ 而不是任何其他 .net 语言.

People always advised me that if I am doing some application that should use some Windows APIs to do any process level job, I must use VC++ and not any other .net language.

这有什么道理吗?

可以使用 VC++ 完成的所有事情也可以用其他 .net 语言完成吗?

Can everything that can be done using VC++ be done in other .net languages also?

比较所有 .net 语言的功能时,它们是否都相同?

Are all the .net languages the same when their capabilities are compared?

推荐答案

如果您需要相当密切地使用本机代码,C++ 可能会让您的生活更轻松.但是,使用 P/Invoke 从 C#、VB.NET、F# 等调用 Win32 API 并没有本质上的错误.

If you need to work with native code fairly intimately, C++ is likely to make life easier. However, there's nothing inherently wrong with using P/Invoke to call into the Win32 API from C#, VB.NET, F# etc.

并非所有 .NET 语言在功能方面都是相同的,尽管 C# 和 VB.NET 在功能上在很大程度上是等效的.我知道 C++/CLI 公开了一些 C# 或 VB.NET 没有公开的东西——我不知道反过来是否正确.(我不知道对于 lambda 表达式、扩展方法等而言,C++/CLI 是什么样的)

Not all .NET languages are the same in terms of capabilities, although C# and VB.NET are largely equivalent in functionality. I know there are some things which C++/CLI exposes which aren't exposed by C# or VB.NET - I don't know if the reverse is true. (I've no idea what C++/CLI is like for lambda expressions, extension methods etc.)

这篇关于Windows API 和 .net 语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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