Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- Variables
- func AnsiBytePtrToString(p *uint8) (string, error)
- func BytePtrToString(p *uint8) string
- func CollectFilesystemValues() (map[string]FilesystemInfo, error)
- func CreateQuery() (syscall.Handle, error)
- func ExecPath() (string, error)
- func GetAdapterList() (*syscall.IpAdapterInfo, error)
- func GetCounterValue(counter syscall.Handle) (float64, error)
- func RegGetInt(hKey uint32, subKey string, value string) (uint32, uintptr, error)
- func RegGetString(hKey uint32, subKey string, value string) (string, uintptr, error)
- type CounterInfo
- type FilesystemInfo
- type MEMORY_STATUS_EX
- type PDH_FMT_COUNTERVALUE_DOUBLE
- type SYSTEM_INFO
Constants ¶
View Source
const ( ERROR_SUCCESS = 0 ERROR_FILE_NOT_FOUND = 2 DRIVE_REMOVABLE = 2 DRIVE_FIXED = 3 HKEY_LOCAL_MACHINE = 0x80000002 RRF_RT_REG_SZ = 0x00000002 RRF_RT_REG_DWORD = 0x00000010 PDH_FMT_DOUBLE = 0x00000200 PDH_INVALID_DATA = 0xc0000bc6 PDH_INVALID_HANDLE = 0xC0000bbc PDH_NO_DATA = 0x800007d5 )
windows system const
View Source
const (
CP_ACP = 0
)
Variables ¶
View Source
var ( RegGetValue = modadvapi32.NewProc("RegGetValueW") GetSystemInfo = modkernel32.NewProc("GetSystemInfo") GetDiskFreeSpaceEx = modkernel32.NewProc("GetDiskFreeSpaceExW") GetLogicalDriveStrings = modkernel32.NewProc("GetLogicalDriveStringsW") GetDriveType = modkernel32.NewProc("GetDriveTypeW") QueryDosDevice = modkernel32.NewProc("QueryDosDeviceW") GetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW") GlobalMemoryStatusEx = modkernel32.NewProc("GlobalMemoryStatusEx") GetModuleFileName = modkernel32.NewProc("GetModuleFileNameW") GetLastError = modkernel32.NewProc("GetLastError") MultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar") PdhOpenQuery = modpdh.NewProc("PdhOpenQuery") PdhAddCounter = modpdh.NewProc("PdhAddCounterW") PdhCollectQueryData = modpdh.NewProc("PdhCollectQueryData") PdhGetFormattedCounterValue = modpdh.NewProc("PdhGetFormattedCounterValue") PdhCloseQuery = modpdh.NewProc("PdhCloseQuery") )
windows procs
Functions ¶
func AnsiBytePtrToString ¶ added in v0.37.0
func CollectFilesystemValues ¶ added in v0.14.3
func CollectFilesystemValues() (map[string]FilesystemInfo, error)
CollectFilesystemValues XXX
func GetCounterValue ¶ added in v0.20.1
GetCounterValue get counter value from handle
Types ¶
type CounterInfo ¶
CounterInfo XXX
func CreateCounter ¶
func CreateCounter(query syscall.Handle, k, v string) (*CounterInfo, error)
CreateCounter XXX
type FilesystemInfo ¶ added in v0.14.3
type FilesystemInfo struct { PercentUsed string KbUsed float64 KbSize float64 KbAvailable float64 Mount string Label string VolumeName string FsType string }
FilesystemInfo XXX
type MEMORY_STATUS_EX ¶ added in v0.14.3
type MEMORY_STATUS_EX struct { Length uint32 MemoryLoad uint32 TotalPhys uint64 AvailPhys uint64 TotalPageFile uint64 AvailPageFile uint64 TotalVirtual uint64 AvailVirtual uint64 AvailExtendedVirtual uint64 }
MEMORY_STATUS_EX XXX
type PDH_FMT_COUNTERVALUE_DOUBLE ¶
PDH_FMT_COUNTERVALUE_DOUBLE XXX
type SYSTEM_INFO ¶
type SYSTEM_INFO struct { ProcessorArchitecture uint16 PageSize uint32 MinimumApplicationAddress *byte MaximumApplicationAddress *byte ActiveProcessorMask *byte NumberOfProcessors uint32 ProcessorType uint32 AllocationGranularity uint32 ProcessorLevel uint16 ProcessorRevision uint16 }
SYSTEM_INFO XXX
Click to show internal directories.
Click to hide internal directories.