c ++ RunPe使用托管代码和本机代码 [英] c++ RunPe working with managed and native code

查看:115
本文介绍了c ++ RunPe使用托管代码和本机代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我的c ++ RunPe有问题。



我使用原生c ++作为存根,我想从内存甚至本机运行或托管的exe。

如果我运行本机exe我的RunPe工作正常,但如果我尝试从内存运行托管exe我的RunPe崩溃。



我想使用原生c ++,因为我的存根必须在几乎所有的32位系统上运行,并且(使用visual studio 2013)我不能在/ CLI中使用/ MT编译器选项,所以我的结果exe需要visual studio运行时dll,dll不存在于所有系统中。



如果我使用原生c ++我可以用/ MT选项编译。



我知道可以在运行时从本机加载.net框架。



有什么想法吗?

Hi all, i have a problem with my c++ RunPe.

I'm using native c++ as the stub, and i want to run from memory even native or managed exe.
If i run native exe my RunPe works fine, but if i try to run managed exe from memory my RunPe crash.

I want to use native c++ because my stub must run on almost all the 32 bit system and (using visual studio 2013) i cant use the /MT compiler options with /CLI so my resulting exe needs the visual studio runtime dll, dll not present in all the system.

If i use native c++ i can compile with /MT options.

I know it's possible to load the .net framework from native in run time.

Any ideas?

推荐答案

嗨谢谢谢谢谢谢你的回复。



所以情况如此:



Stub是一个32位的Win32应用程序(本机)。



如果我放了一个存根(作为资源)中的本机exe(32位控制台或Win32)存根可以从内存中存储本机exe。

如果我在存根中放置托管exe,我得到(不可能运行申请)



谢谢!
Hi Sergey and thanks for the reply.

So this is the situation :

the Stub is a 32 bit Win32 application (native).

if i put a native exe (32 bit console or Win32) in the stub (as resource) the stub can lanch the native exe from memory.
if i put a managed exe in the stub, i get ("Impossible to run application")

thanks!


这篇关于c ++ RunPe使用托管代码和本机代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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