运行时是否从硬盘读取嵌入式文件? [英] Are Embedded Files Read from Hard Drive During Runtime?

查看:74
本文介绍了运行时是否从硬盘读取嵌入式文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序,它使用大约80个嵌入式文本文件.我想更改它,以便可以在不更新可执行文件的情况下更新文件.如果我将文件存储在一个公共文件夹中,这会导致更多的磁盘活动而不是使它们保持嵌入式状态吗?

我在这里找到了有关嵌入式文件的不错的文章:

I have a Windows application that uses about 80 embedded text files. I would like to change it so the files can be updated without having to update the executable. If I store the files in a common folder, will this cause more disk activity vs. keeping them embedded?

I found a decent article on embedded files here: http://devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=75 .  It states that embedded files are part of the meta data of the executable.

I don't believe that all of my embedded files are loaded into memory when the app. runs.  I think that the meta data is read from the rather large .exe file.

Does anyone know whether an embedded file is read from the exe file, or is it read from memory, when you access it during runtime?

Thanks in advance for any replies.

推荐答案

鉴于C#是 NOT ,不是像所有高级语言一样,都是用C ++编写的语言和运行时主机行为传达-嵌入式文件就是...嵌入式.您的安装大小将反映资源,但不会对运行时间造成影响.

运行时间活动/大小在使用之前不会受到影响-像Vegan所说.遵循COFF标准的文件将保持独立状态,就像它们在物理上不在PE资源的范围内一样.

Given that C# was NOT written in C++, like all high level languages and runtime host behaviors convey - embedded files are just that...  embedded.  Your install size will reflect the resource, but there is no runtime impact.

Runtime activity/size will not be impacted until they are used - like Vegan said.  Files following the COFF standard remain standalone as if they were physically outside of the PE's resources. 


这篇关于运行时是否从硬盘读取嵌入式文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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