0

我正在尝试从我的注册表中读取一个值,但它是 REG_BINARY。它只能从我测试的内容中读取 REG_SZ。

MsgBox(My.Computer.Registry.GetValue("PATH", "Name", Nothing))

如何从注册表中读取二进制文件?

4

1 回答 1

2

GetValue()被宣布返回Object。要读取二进制值,您应该只转换结果:

Dim value as Object = My.Computer.Registry.GetValue("PATH", "Name", Nothing)
Dim bytes as Byte() = CType(value, Byte())
于 2013-01-03T17:37:06.690 回答