Is there a way to programmatically determine if a given file path and name is stored in ROM (i.e. came installed on the device) or RAM (i.e. created after a hard reset)?
+3
A:
Get the file attributes and check to see if FILE_ATTRIBUTE_ROMMODULE is set.
ctacke
2008-09-25 19:39:05
A:
There is no 100% of telling if a file is in rom or not...
For most files though you check the file attributes for either "FILE_ATTRIBUTE_INROM" or "FILE_ATTRIBUTE_ROMMODULE".
"FILE_ATTRIBUTE_INROM" - normal data files. "FILE_ATTRIBUTE_ROMMODULE" - executable code files (dll, exe's, etc) (these files are not like the normal executable files tho as they are "run in place", so they are like a run of code / data from memory).
There are other files that are "in rom" but are not marked as such!! There is no real way of telling until you try to delete them, which you can't.
Shane Powell
2008-10-30 20:38:48