简体   繁体   English

加载另一个exe作为程序集并创建其启动对象(主窗体)。 那可能吗?

[英]Loading another exe as assembly and creating its startup object (main form). Is that possible?

I have a program written in .net language. 我有一个用.net语言编写的程序。 I don't have sources for it. 我没有资料。 I added it to my program as assembly and all is fine unless I try to create it's main form: 我将其作为程序集添加到程序中,除非我尝试创建它的主要形式,否则一切都很好:

GCRebuilder.MainForm main_wnd = new GCRebuilder.MainForm();

Here I getting exception FileNotFoundexception. 在这里,我得到异常FileNotFoundexception. Unable to load a file or assembly "gcr, Version=1.0.3480.29421, Culture=neutral, PublicKeyToken=null" or one of it's dependencies. Unable to find specified file. That program that I trying to load is a single exe only. 我尝试加载的程序仅是一个exe。

It there anything can be done or this is waste of time? 有什么可以做的还是浪费时间? I need this to use program functionality through invoking needed for me methods of main form. 我需要它通过调用主要形式的方法来使用程序功能。

您可能需要检查DotPeek(免费软件)以查看程序集的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM