内存中的程序集 [英] In-Memory Assemblies

查看:93
本文介绍了内存中的程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在努力让事情发挥作用,我很确定它可以做到,但是我好了b $ b不能得到它工作。


我有一个加密文件,其中包含我的软件所需的一切:exe,

dlls,et al。我想做一个装载机这将解密文件并获得内存中的所有部分并在内存中运行exe而不将其丢弃到

磁盘。有可能吗?我该怎么办?我绝对不需要

从我的加载器引用dll,它只需要调用exe然后

exe就可以找到它自己的dll。 />

作为另一种选择......在某些地方我可以将文件放在磁盘上而不是用户能够访问磁盘吗?我的意思是,就像我自己的Loader专用的虚拟

磁盘一样。申请?


谢谢


ThunderMusic

解决方案

嘿ThunderMusic,


看一下这篇文章: http://www.codeproject.com/useritems...toAssembly.asp


"此示例显示如何加载应用程序并从内存运行

系统。应用程序加载后,您可以使用它而不使用源

EXE文件(通常是从系统中阻止)。当你没有

将源EXE文件放在HDD上时很有用(例如在USB密钥上)。

Colby Africa
http://colbyafrica.blogspot.com


< blockquote>

好​​吧,现在......因为C#似乎需要一个磁盘上的程序集,它是否可以像内存中的虚拟磁盘一样创建
(比如虚拟驱动器)

其中C#可以读取它需要的内容但是用户无法访问

访问?


谢谢


ThunderMusic

" ThunderMusic" < No ************************* @ NoSpAm.com写信息

新闻:%2 **** ************ @ TK2MSFTNGP04.phx.gbl ...




我''我试图让一些东西工作,我很确定它可以做到,但是

我不能让它工作。


我有一个加密文件,包含我的软件所需的一切:exe,

dlls,et al。我想做一个装载机这将解密文件并获得内存中的所有部分并在内存中运行exe而不将其丢弃到

磁盘。有可能吗?我该怎么办?我绝对不需要

从我的加载器引用dll,它只需要调用exe和

然后exe就可以找到它自己的dll。 />

作为另一种选择......在某些地方我可以将文件放在磁盘上而不是用户能够访问磁盘吗?我的意思是,就像一个专门保留给我自己的Loader的

虚拟磁盘。申请?


谢谢


ThunderMusic



一个RAM磁盘会很精彩,但是它可以作为一个设备实现

驱动程序......你可以看看内存映射文件:

http://www.winterdom.com/dev/dotnet/index.html


Hi,
I''m trying to make something work and I''m pretty sure it can be done, but I
can''t get it working.

I have a encrypted file that contains everything my software needs: exe,
dlls, et al. I want to make a "loader" that will decrypt the file and get
all parts in memory and run the exe in-memory without dropping it to the
disk. Is it possible or not? and how can I do it? I absolutely dont need to
reference the dlls from my loader, it only needs to call the exe and then
the exe could find it''s own dlls.

As an other option... is there some place where I could place the file on
the disk without the user being able to access them? I mean, like a virtual
disk reserved exclusively to my own "Loader" application?

thanks

ThunderMusic

解决方案

Hey ThunderMusic,

Take a look at this article: http://www.codeproject.com/useritems...toAssembly.asp

"This example shows how to load an application and run from memory
system. After the application load, you can use it without the source
EXE file (usually blocked from the system). Useful when you don''t have
to have the source EXE file on HDD (e.g. on a USB key)."
Colby Africa
http://colbyafrica.blogspot.com


Hi,
ok, now... since C# seems to require an on-disk assembly, would it be
possible to create like a virtual disk in-memory (like a virtual drive)
where C# could read what it needs to but where the user could not have
access to?

Thanks

ThunderMusic
"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...

Hi,
I''m trying to make something work and I''m pretty sure it can be done, but
I can''t get it working.

I have a encrypted file that contains everything my software needs: exe,
dlls, et al. I want to make a "loader" that will decrypt the file and get
all parts in memory and run the exe in-memory without dropping it to the
disk. Is it possible or not? and how can I do it? I absolutely dont need
to reference the dlls from my loader, it only needs to call the exe and
then the exe could find it''s own dlls.

As an other option... is there some place where I could place the file on
the disk without the user being able to access them? I mean, like a
virtual disk reserved exclusively to my own "Loader" application?

thanks

ThunderMusic



A RAM disk would be wonderful, but that is implemented as a device
driver... You could take a look at memory mapped files:

http://www.winterdom.com/dev/dotnet/index.html


这篇关于内存中的程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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