Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetComputerName ¶
func GetComputerName(f WinComputerNameFormat) (string, error)
GetComputerName wraps the GetComputerNameW function in a more Go-like way https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexw
Types ¶
type MemoryStatus ¶
type MemoryStatus struct { MemoryLoad uint32 TotalPhys uint64 AvailPhys uint64 TotalPageFile uint64 AvailPageFile uint64 TotalVirtual uint64 AvailVirtual uint64 AvailExtendedVirtual uint64 }
MemoryStatus is an idiomatic wrapper for MemoryStatusEx.
func GlobalMemoryStatusEx ¶
func GlobalMemoryStatusEx() (MemoryStatus, error)
GlobalMemoryStatusEx retrieves information about the system's current usage of both physical and virtual memory. https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-globalmemorystatusex
type ProcessorArchitecture ¶
type ProcessorArchitecture uint16
ProcessorArchitecture is an idiomatic wrapper for wProcessorArchitecture.
const ( AMD64 ProcessorArchitecture = 9 ARM ProcessorArchitecture = 5 ARM64 ProcessorArchitecture = 12 IA64 ProcessorArchitecture = 6 INTEL ProcessorArchitecture = 0 UNKNOWN ProcessorArchitecture = 0xffff )
Idiomatic values for wProcessorArchitecture.
type SystemInfo ¶
type SystemInfo struct { Arch ProcessorArchitecture PageSize uint32 MinimumApplicationAddress uintptr MaximumApplicationAddress uintptr ActiveProcessorMask uint NumberOfProcessors uint32 ProcessorType uint32 AllocationGranularity uint32 ProcessorLevel uint16 ProcessorRevision uint16 }
SystemInfo is an idiomatic wrapper for LpSystemInfo.
func GetSystemInfo ¶
func GetSystemInfo() SystemInfo
GetSystemInfo is an idiomatic wrapper for the GetSystemInfo function from sysinfoapi https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo
type WinComputerNameFormat ¶
type WinComputerNameFormat int
WinComputerNameFormat is a wrapper for COMPUTER_NAME_FORMAT.
const ( ComputerNameNetBIOS WinComputerNameFormat = iota ComputerNameDNSHostname ComputerNameDNSDomain ComputerNameDNSFullyQualified ComputerNamePhysicalNetBIOS ComputerNamePhysicalDNSHostname ComputerNamePhysicalDNSDomain ComputerNamePhysicalDNSFullyQualified ComputerNameMax )
Definitions for WinComputerNameFormat constants.