标题:注册表如何读写reg_bianry数据?
取消只看楼主
calf18
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-10-14
结帖率:0
已结贴  问题点数:20 回复次数:0 
注册表如何读写reg_bianry数据?
注册表中字符串的读写已经解决,但reg_bianry数据如何读写,有几点疑问:

1、注册表中显示的值(hex)和以下语句读取bytevalue的值不一样:

Dim subvalue() As String,currentuser As RegistryKey,bytevalue() As Byte
currentuser = ("Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRULegacy", True)
subvalue = currentuser.GetValueNames
j = subvalue.GetUpperBound(0)
For i = 0 To j
    bytevalue = currentuser.GetValue(subvalue(i))
Next

2、如何将bytevalue转换成字符串,用System.Text.Encoding.Unicode.GetString(bytevalue)只能得到一部分;

3、如何写入reg_binary值,以下语句不行

currentuser.SetValue(valuekey, setbytevalue, RegistryValueKind.Binary)
setbytevalue为byte数组
搜索更多相关主题的帖子: 注册表 bianry reg 数据 
2010-10-15 10:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-322955-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.573585 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved