2012-01-27 71 views

回答

6

你可以把资源作为字节[]

byte[] myResBytes = ...; 
Assembly asm = Assembly.Load(myResBytes); 
// search for the Entry Point 
MethodInfo method = asm.EntryPoint; 
if(method == null) throw new NotSupportedException(); 
// create an instance of the Startup form Main method 
object o = asm.CreateInstance(method.Name); 
// invoke the application starting point 
method.Invoke(o, null); 

另见here更多细节

希望这有助于

+0

谢谢.. !!尽管我早先已经看到了这种联系,但您将它放在了正确的角度。 – arunondeck 2012-01-27 12:40:52

+0

如果正在执行的文件是.net可执行文件或win32可执行文件,它会有所作为吗?只要调用64位可执行文件的32位可执行文件有任何限制?反之亦然? – MitchellKrenz 2015-01-27 20:13:24

+0

我不认为它......试一试 – 2015-01-27 22:04:32

1

您必须使用Process.Start方法。看到它在msdn

+1

Process.Start不能用于运行资源文件 – arunondeck 2012-01-27 10:13:05

相关问题