(一)想在WINCE下实现冷启动保存注册表,参照帮助用hive-based registry实现,可是存在疑问.
在CF卡上实现断电保存注册表,使用的是CE5.0,定制时加入了HIVE项,在platform.reg里加入了以下字段:
; HIVE BOOT SECTION (系统启动时的识别关键字)
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="Documents and Settings\\system.hv"
"Startup DevMgr"=dword:1
"Registryflags"=dword:1 (修改后关闭时自动刷新从而保存)
[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS] (文件系统)
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000064
"Paging"=dword:1
"EnableCache"=dword:1
"CacheSize"=dword:0
"Util"="fatutil.dll"
"CacheDll"="diskcache.dll"
"Flags"=dword:1000 (只加载一次文件驱动)
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile] (存储驱动)
"MountAsBootable"=dword:1 (帮助里说CE5.0忽略了Mountflags关键字)
; END HIVE BOOT SECTION
还是没有实现HIVE功能,哪里没有做到位?
而我尝试了这样修改platform.reg
;registry
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:0
IF BSP_ENABLE_FSREGHIVE
"Start DevMgr"=dword:1
ENDIF
[HKEY_LOCAL_MACHINE\init\BootVars]
"DefaultUser"="default"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
"MountFlags"=dword:2
; END HIVE BOOT SECTION
修改project.reg
;registry
[HKEY_LOCAL_MACHINE\init\BootVars]
"SystemHive"="Documents and Settings\\system.hv"
"Startup DevMgr"=dword:1
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS]
"FriendlyName"="FAT FileSystem"
"Dll"="fatfsd.dll"
"Flags"=dword:00000064
"Paging"=dword:1
"EnableCache"=dword:1
"CacheSize"=dword:0
"Util"="fatutil.dll"
"CacheDll"="diskcache.dll"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]
"Mountflags"=dword:2
; END HIVE BOOT SECTION
实现了冷启动的注册表保存.问题待分析...
(二)加入以太网项和驱动后用ping命令发现返回 error 1100,后来找到是防火墙要关掉才能ping通