话说这个东西是够蛋疼的,当时在发《Delphi Read/Write REG_MULTI_SZ》一篇的时候就注意到读到的信息虽然是正确的,但是在写入的时候却发生了错误。如果再读的话那就更不对了。 从网上查了一下那个蛋疼的REG_MULTI_SZ到底是个什么东西,但是大部分人的结论就是这么一句:
REG_MULTI_SZ 一个以空字符结束的字符串数组,被两个null字符结束。
看了半天也没发现到底信息后面写的是什么东西,看来是我太笨了!
今天又遇到这个问题索性把注册表中的一个REG_MULTI_SZ 键值倒了出来,原来竟然是这么一串东东:
1 2 3 4 5 6 7 8 9 10 11 12 | Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System] "Component Information"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 "Identifier"="AT/AT COMPATIBLE" "Configuration Data"=hex(9):ff,ff,ff,ff,ff,ff,ff,ff,00,00,00,00,02,00,00,00,05,\ 00,00,00,0c,00,00,00,00,00,00,00,00,00,00,00,80,00,ff,03,00,00,3f,00,fe,00,\ 01,00,05,00,00,00,18,00,00,00,00,00,00,00,00,00,00,00,00,00,0c,00,00,de,00,\ 00,00,00,0e,00,00,00,01,00,00,00,0f,00,00,00,01,00 "SystemBiosDate"="12/17/10" "SystemBiosVersion"=hex(7):31,00,32,00,31,00,37,00,31,00,30,00,20,00,2d,00,20,\ 00,32,00,30,00,31,00,30,00,31,00,32,00,31,00,37,00,00,00,00,00 |
结束的地方是00,00,00,00,00~
,知道了是怎么结束的也就知道该怎么写回去了。擦,太蛋疼了~
分享一套等宽字体,挺好看的。猛击此处下载字体!下图是在vs 2008中的效果:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Buttons, Registry, StdCtrls; type TExRegistry = class(TRegistry) public procedure ReadStrings(const valueName: string; strings: TStrings); procedure WriteStrings(const valueName: string; strings: TStrings); end; type EExRegistryException = class(ERegistryException) private fCode: Integer; function GetError : string; public constructor CreateLastError (const st : string); constructor Create (code : DWORD; const st : string); property Code : Integer read fCode; end; |
1.程序会自动获取Opera的个人数据的文件夹以及程序安装目录,通常不需要自己修改个人数据路径。
2.数据的备份目录可以通过右侧的按钮进行选择或者直接输入目标目录。
3.特别说明,这里的目录在备份的时候只需要选择到D:\Documents and Settings\obaby\Application Data\Opera\即可,如果继续进入到下级D:\Documents and Settings\obaby\Application Data\Opera\opera在备份完成之后将可能出现还原错误。
还原的时候同样选择到opera文件夹的上级目录即可。
有什么问题可以在后面给我留言!猛击此处下载程序!