Tutorials to .com

Tutorials to .com » Os » Mobile » Platform Builder Tour (e)

Platform Builder Tour (e)

Print View , by: iSee ,Total views: 16 ,Word Count: 1974 ,Date: Thu, 11 Jun 2009 Time: 8:48 PM

With the development of CE, the object store (Object Store) is getting smaller and smaller role, while the large-capacity permanent storage device to be used more and more, this chapter will address the file system on the CE-related knowledge, so that the development of PB who, in addition to adding to the permanent storage device support, but also do some optimization. I remember in the previous article said that in the PB how to customize the kernel by adding the hard disk, CD-ROM support (including the ATA device drivers and file systems), and will not repeat it here.

CE provides the three file system, based on the file system ROM, RAM-based file system, FAT file system. FAT file system the most widely used, can be used in ATA devices, flash memory devices, SRAM memory devices, and also allows CE developers to prepare their own and register a file system, as long as the interface in line with the Win32 file system API to.

CD / UDFS file system

Both file systems are used to read CD, DVD and so on. In addition to PB by the "catalog" to add the file system, but also add in the PB environment variables to achieve SYSGEN_UDFS. CDFS and UDFS registration in the registry information is as follows:

; Default values for udfs. These can be overridden per profile.
[HKEY_LOCAL_MACHINESystemStorageManagerUDFS]
"FriendlyName"="CDFS/UDFS FileSystem"
"Dll"="udfs.dll"
"Paging"=dword:1
[HKEY_LOCAL_MACHINESystemStorageManagerProfilesCDProfile]
"Name"="IDE CDROM/DVD Drive"
"Folder"="CDROM Drive"
"DefaultFileSystem"="UDFS"
"PartitionDriver"=""
; Default values for udfs. These can be overridden per profile.
[HKEY_LOCAL_MACHINESystemStorageManagerUDFS]
"FriendlyName"="CDFS/UDFS FileSystem"
"Dll"="udfs.dll"
"Paging"=dword:1
[HKEY_LOCAL_MACHINESystemStorageManagerProfilesCDProfile]
"Name"="IDE CDROM/DVD Drive"
"Folder"="CDROM Drive"
"DefaultFileSystem"="UDFS"
"PartitionDriver"=""
above common.reg registry information in the document. Registry data is effective from top to bottom, that is to say the following data can be covered by the above data. As can be seen from the registry data udfs.dll contains UDFS file system driver, CDROM drive, called the "CDROM Drive", the file system used for UDFS, there is no partition driver. If we are to visit the CDROM directory or file name will be before the "CDROM Driver". Note that you may common.reg of the data file "Flolder" Service is different from the above, such as "Folder" = LOC_STORE_CD_FOLDER, then you can change in accordance with the above data, or to find *. str file LOC_STORE_CD_FOLDER, find the ID corresponds to the string to change (the documents may find that many countries should look to the code directory for the directory name).

FAT File System

In addition to safety outside, FAT file system is a very good file system, it is suitable for use in embedded devices. CE also FAT external storage devices as a common file system. FAT file system to add the environment variable for SYSGEN_FATFS. Not listed in the operation of CE to provide FAT file system DefragVolume     ,。
DefragVolumeUI    ,。
FormatVolume     。
FormatVolumeUI    ,。
ScanVolume      FAT。
ScanVolumeUI     ,。
DefragVolume DefragVolume     ,。
DefragVolumeUI    ,。
FormatVolume     。
FormatVolumeUI    ,。
ScanVolume      FAT。
ScanVolumeUI     ,。
DefragVolume     ,。
DefragVolumeUI    ,。
FormatVolume     。
FormatVolumeUI    ,。
ScanVolume      FAT。
ScanVolumeUI     ,。
FAT file system of registration in the registry information is as ; Default values for fatfs. These can be overridden per profile
[HKEY_LOCAL_MACHINESystemStorageManagerFATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000024
"Paging"=dword:1
"CacheSize"=dword:0
; Default values for fatfs. These can be overridden per profile
[HKEY_LOCAL_MACHINESystemStorageManagerFATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000024
"Paging"=dword:1
"CacheSize"=dword:0
; Default values for fatfs. These can be overridden per profile
[HKEY_LOCAL_MACHINESystemStorageManagerFATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000024
"Paging"=dword:1
"CacheSize"=dword:0
; Default values for fatfs. These can be overridden per profile
[HKEY_LOCAL_MACHINESystemStorageManagerFATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000024
"Paging"=dword:1
"CacheSize"=dword:0
data can be seen from the registry fatfsd.dll includes FAT file system driver. On "Flags" value described as follows:

Logo Value Description
FATFS_UPDATE_ACCESS 0x00000001 Updated access time
FATFS_DISABLE_AUTOSCAN 0x00000004 Can not automatically call ScanVolume
FATFS_VERIFY_WRITES 0x00000008 Inspection of all write operations
FATFS_ENABLE_BACKUP_FAT 0x00000010 Backup FAT table
FATFS_FORCE_WRITETHROUGH 0x00000020 The system can be any data in the buffer disk writes, this system will speed up the write speed of data to disk
FATFS_DISABLE_AUTOFORMAT 0x00000040 Prohibition of automatic formatting of unformatted partition
FATFS_DISABLE_COMPCHECK 0x00000080 Automatically detects the compression District to prohibit

"Paging" is used to specify whether paging, paging can be a value of 1, 0 can not be paged. "CacheSize" is used to specify the buffer size FAT file system. Specific value is 16 hexadecimal number that the number of sectors. If the "CacheSize" value is 400, then the byte buffer for FAT for 1024 * 512 = 512KB.

Storage Manager is the default file system FAT file system, so the hard disk, USB, PCMCIA and other registry information storage devices are not specified the default file system.

File System Filter

File system filter is a DLL. Storage Manager API is called before the file system file system calls the filter function filters, filter function can be achieved through the document data encryption, decryption, compressed files and even the existence of the virus scan. The realization of the file system filter is a first step in the preparation of the DLL, CE provide examples of procedures, is located under% _WINCEROOT% PublicCommonOAKDriversFSD. And then add the code to modify the registry data. Registry location is as follows:

HKEY_LOCAL_MACHINESystemStorageManagerProfilesProfileNameFileSystemFilters

HKEY_LOCAL_MACHINESystemStorageManagerFileSystemFilters

HKEY_LOCAL_MACHINESystemStorageManagerFilters

Registry keys and their key examples are as follows:

"Dll" := "fsdspy.dll" ////DLL
Order = 0 ////

ProfileName here is the Profile name, such as HDProfile. FileSystem is the specific file system, such as FATFS, UDFS, RELFSD. 1 pointed out that the number of file system filters to specify file system storage hardware effectively; figure 2 that the file system filter file system on the specified effective; figure 3 for all the file system more effective.

Storage Manager

Storage Manager (Storage Manager) is a Windows CE. NET's new features, key management storage device drivers, file system driver, driver partition, file system filter. Storage Manager registry data in accordance with the need to load the module. Specific registry data as follows:

[HKEY_LOCAL_MACHINESystemStorageManager]
"Dll"="fsdmgr.dll"
"PNPUnloadDelay"=dword:1000
[HKEY_LOCAL_MACHINESystemStorageManager]
"Dll"="fsdmgr.dll"
"PNPUnloadDelay"=dword:1000
fsdmgr.dll Storage Manager contains the code. "PNPUnloadDelay" refers to storage management in the plug-and-play devices to receive notice of the unloading of the delay time. Specific storage management requires the management of information storage devices in the registry under the HKEY_LOCAL_MACHINESystemStorageManagerProfiles. For example, the registry information on the hard disk is as follows: [HKEY_LOCAL_MACHINESystemStorageManagerProfilesHDProfile]
"Name"="IDE Hard Disk Drive"
"Folder"="Hard Disk"
"AutoMount"=dword:1
"AutoPart"=dword:0
"AutoFormat"=dword:0
"MountFlags"=dword:0
"FileSystem"="fatfsd.dll"
"PartitionDriver"="mspart.dll"
[HKEY_LOCAL_MACHINESystemStorageManagerProfilesHDProfile]
"Name"="IDE Hard Disk Drive"
"Folder"="Hard Disk"
"AutoMount"=dword:1
"AutoPart"=dword:0
"AutoFormat"=dword:0
"MountFlags"=dword:0
"FileSystem"="fatfsd.dll"
"PartitionDriver"="mspart.dll"
[HKEY_LOCAL_MACHINESystemStorageManagerProfilesHDProfile]
"Name"="IDE Hard Disk Drive"
"Folder"="Hard Disk"
"AutoMount"=dword:1
"AutoPart"=dword:0
"AutoFormat"=dword:0
"MountFlags"=dword:0
"FileSystem"="fatfsd.dll"
"PartitionDriver"="mspart.dll"
"Name" refers to the name; "Folder" refers to a directory name, can change the directory name; "AutoMount" means a district, if detected automatically after installation file system; "AutoPart" means if Zoning is not automatically the most available space is divided into a district; "AutoFormat" means automatically if there is no format to format; "FileSystem" designated storage devices used in the file system, If you do not specify on the use of the default file system; "PartitionDriver" designated driver District; "MountFlags" refers to the file system to be installed. A value of 1 to specify a hidden file system, if the file system is hidden, then the file system will not be discovered API to find documents, but if the absolute path of the specified file, or can be accessed. Value of 2 to specify the current file system containing the system registry. A storage device the first partition will contain the HIVE-based registry of the system (on the HIVE-based registry, see the article mentioned previously). Value of 4 the file system designated as the root of the entire file system (), here to explain, CE default object stored as a file system root (), when placed in the root of a document, such as a.dat, this document actually stored in the object store. If the other file system designated as the root, then the document will be stored in the file system where the storage device. Value of 8 when the specified value of the designated 4:00 hide ROM.


Mobile OS Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.