|
因项目需求,要给应用程序提供一个直接操作NandFlash的接口,小弟在网上找到些直接操作Flash的文章,按照上面试了下,
[code]
m_hFmd = CreateFile(_T("DSK1:"),GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
运行这句话的时候出现了错误信息,打印出来就是“指定的网络资源或设备不再可用。”
注册表里有关NandFlash的信息如下:
[code]
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"DefaultFileSystem"="BINFS"
"PartitionDriver"="mspart.dll"
"MountHidden"=dword:1
"MountAsROM"=dword:1
"Folder"="NAND Flash"
"Name"="FLASH Disk Block Device"
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash\FATFS]
"MountHidden"=dword:0
"MountAsROM"=dword:0
[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\MSFlash]
"DriverPath"="Drivers\\BuiltIn\\MSFlash"
;LoadFlags 0x01 == load synchronously
"LoadFlags"=dword:1
;"LoadFlags"=dword:0
"Order"=dword:0
请教高手~~~
|
|