VB.NET |阅读Binary Off Registry?

时间:2013-01-03 17:31:36

标签: vb.net binary

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

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

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

1 个答案:

答案 0 :(得分:2)

声明

GetValue()返回Object。要读取二进制值,您应该只输出结果:

Dim value as Object = My.Computer.Registry.GetValue("PATH", "Name", Nothing)
Dim bytes as Byte() = CType(value, Byte())