反向PInvoke并创建一个完整的非托管C#程序 [英] Reverse PInvoke and create a full unmanaged C# program

查看:129
本文介绍了反向PInvoke并创建一个完整的非托管C#程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个奇怪的问题,但这个想法很简单:我更喜欢的C#语法,而不是C ++:
里面直接财产
-Setters和getterγ-接口
-foreach声明
-possibility申报隐式转换操作符

I know this is a strange question but the idea is simple: I prefer C# syntax rather than C++: -Setters and getters directly inside a property -interfaces -foreach statement -possibility to declare an implicit cast operator

等小东西......

other small things...

我真的不知道的是,如果有可能在C#中导入C ++ DLL(expecially STD库),如果我不使用任何名称空间(即使系统)

What I really don't know is if is possible to import a c++ dll (expecially std libraries) in C# if I don't use any namespace (even System)

我们的想法是刚刚写利用一切++的程序,你通常会用C使用(没有从CLR左右),甚至的printf例如:

The idea is just to write a program using everything that you will normally use in C++ (nothing from CLR so), even printf for example

感谢您的任何答案

推荐答案

现在有东西接近这个

。NET本地编译C#来执行像C ++本机代码。您将继续从与本机代码的伟大业绩的.NET Framework的生产力和熟悉受益。

.NET Native compiles C# to native machine code that performs like C++. You will continue to benefit from the productivity and familiarity of the .NET Framework with the great performance of native code.

这是为Windows Store的应用程序(桌面应用程序可能会在未来):

It's for Windows Store apps only (desktop apps may come in the future):

桌面应用程序是我们战略的一个重要组成部分。最初,我们的重点是Windows应用商店的应用程序使用.NET本土。从长远来看,我们将继续改善所有.NET应用程序的本地编译。

Desktop apps are a very important part of our strategy. Initially, we are focusing on Windows Store apps with .NET Native. In the longer term we will continue to improve native compilation for all .NET applications.

应用将得到部署在终端用户设备作为完全独立的本地编译代码(.NET时进入本土生产),并且不会对.NET框架的依赖目标设备/机械

apps will get deployed on end-user devices as fully self-contained natively compiled code (when .NET Native enters production), and will not have a dependency on the .NET Framework on the target device/machine

这篇关于反向PInvoke并创建一个完整的非托管C#程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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