vb 中的注册表 Dword 是哪个数字?

发布于 2024-08-06 12:25:10 字数 77 浏览 5 评论 0 原文

根据最小值和最大值,VB 中的注册表 Dword 的数字转换为哪个数字?

我正在尝试构建一个可以读取和编辑注册表转储的编辑器

Which number cast is a registry Dword in vb based on its minimum and max values?

I am trying to build an editor that can read and edit registry dumps

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

朱染 2024-08-13 12:25:10

这实际上很容易找出:

Dim value As Object = Registry.GetValue("HKEY_CURRENT_USER\Console", "FontSize", -1)
Console.WriteLine(value.GetType().FullName)

对于 REG_DWORD 值,这将打印“System.Int32”,这在 VB.NET 中是一个Integer

This is actually fairly easy to find out:

Dim value As Object = Registry.GetValue("HKEY_CURRENT_USER\Console", "FontSize", -1)
Console.WriteLine(value.GetType().FullName)

In the case of a REG_DWORD value this will print "System.Int32", which would be an Integer in VB.NET.

梦萦几度 2024-08-13 12:25:10

对于 VB.Net,您应该使用Integer 数据类型。有关可用数据类型的详细信息,请参阅这个方便的列表 。在旧版 Visual Basic 中,您可能使用long 数据类型。

它具有正确的位数(32;x86 DWORD 是一个“双字”,其中一个字被理解为 16 位),但我认为 VB 不支持“无符号”值存在一个小问题。此限制可能会使演示/编辑变得更加复杂。

For VB.Net, you should use the Integer data type. See this handy list for details on the available datatypes. In older Visual Basic, you would have used the long data type.

This has the proper number of bits (32; an x86 DWORD is a "double word", where a word is understood to be 16-bit), but I think there's a slight problem with VB not supporting "unsigned" values. This limitation might make presentation/editing a bit more complicated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文