add std/private/win_getsysteminfo; refactor the usage of GetSystemInfo (#19310)
* add std/private/win_getsysteminfo * import at the top level * wrappers follow nep1 too * follow review comment
This commit is contained in:
parent
0bcd7062c6
commit
1869826668
3 changed files with 23 additions and 35 deletions
15
lib/std/private/win_getsysteminfo.nim
Normal file
15
lib/std/private/win_getsysteminfo.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
type
|
||||
SystemInfo* = object
|
||||
u1: uint32
|
||||
dwPageSize: uint32
|
||||
lpMinimumApplicationAddress: pointer
|
||||
lpMaximumApplicationAddress: pointer
|
||||
dwActiveProcessorMask: ptr uint32
|
||||
dwNumberOfProcessors*: uint32
|
||||
dwProcessorType: uint32
|
||||
dwAllocationGranularity*: uint32
|
||||
wProcessorLevel: uint16
|
||||
wProcessorRevision: uint16
|
||||
|
||||
proc getSystemInfo*(lpSystemInfo: ptr SystemInfo) {.stdcall,
|
||||
dynlib: "kernel32", importc: "GetSystemInfo".}
|
||||
Loading…
Add table
Add a link
Reference in a new issue