-
-
Notifications
You must be signed in to change notification settings - Fork 226
Add Kernel32.GetNativeSystemInfo #499
Add Kernel32.GetNativeSystemInfo #499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for contributing. just a couple of touch-ups, please.
src/Kernel32/Kernel32+SYSTEM_INFO.cs
Outdated
/// A mask representing the set of processors configured into the system. | ||
/// Bit 0 is processor 0; bit 31 is processor 31. | ||
/// </summary> | ||
public int* dwActiveProcessorMask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really a pointer. It's just a pointer-sized field. Let's use IntPtr
here to make that clear.
src/Kernel32/Kernel32+SYSTEM_INFO.cs
Outdated
/// <summary> | ||
/// The architecture-dependent processor level. It should be used only for display purposes. | ||
/// </summary> | ||
public short wProcessorLevel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ushort
is more appropriate here since it's an (unsigned) WORD
in native code. We'll sometimes use int
instead of uint
where the value is likely to be used in other .NET APIs that take int
, but as a short
/ushort
, it's already non-standard. And I suspect ushort
is accepted by int
APIs implicitly anyway since the range just grows.
src/Kernel32/Kernel32+SYSTEM_INFO.cs
Outdated
/// <summary> | ||
/// The architecture-dependent processor revision. | ||
/// </summary> | ||
public short wProcessorRevision; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ushort
is more appropriate here since it's an (unsigned) WORD
in native code.
No description provided.