一边是.net一边是windows api怎么办?解决办法:managed c++
It is the only language that can communicate directly with .NET languages (such as C#, VB.NET) and native C++. The other .NET languages can only communicate with C++ code via PInvoke or COM. But since Managed C++ can communicate directly in both managed and unmanaged contexts, it is often used as a "bridge".
managed c++是唯一可以与.net和native c++进行通讯的语言,其他.net语言只能通过Pinvoke等调用native代码。所以在你的项目中,通常可以把managed c++代码作为一个“桥“来使用,沟通C#和其他的c++代码,包括windows api