http://www.sqreg.com/file/vb/reg_01.htm
http://www.sqreg.com/file/vb/reg_02.htm
http://www.sqreg.com/file/vb/reg_03.htm
http://www.sqreg.com/file/vb/reg_04.htm
http://www.sqreg.com/file/vb/reg_05.htm
http://www.sqreg.com/file/vb/reg_06.htm
http://www.sqreg.com/file/vb/reg_07.htm
http://www.sqreg.com/file/vb/reg_02.htm
http://www.sqreg.com/file/vb/reg_03.htm
http://www.sqreg.com/file/vb/reg_04.htm
http://www.sqreg.com/file/vb/reg_05.htm
http://www.sqreg.com/file/vb/reg_06.htm
http://www.sqreg.com/file/vb/reg_07.htm
我就是通过这个东东写、读注册表的,对了这个程序有个bug就是向注册表写string时不支持中文,你把函数SetStringValue中的
rtn = RegSetValueEx(hKey, Entry, 0, REG_SZ, ByVal Value,Len(Value))
改成
rtn = RegSetValueEx(hKey, Entry, 0, REG_SZ, ByVal Value,Len(Value) * 2)
就可以了!其他的我还没有发现!
读取string的函数GetStringValue有bug解决方法如下
GetStringValue中:
if ChineseFlg then '说明是中文的
GetStringValue = Left(sBuffer, Len(sBuffer) - 2)
else '英文
GetStringValue = Left(sBuffer, Len(sBuffer) - 1)
end if
www.helpwork.net书库