kernel32

package
v0.31.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	// JobObjectQuery is required to retrieve certain information about a job object,
	// such as attributes and accounting information (see QueryInformationJobObject and IsProcessInJob).
	// https://learn.microsoft.com/en-us/windows/win32/procthread/job-object-security-and-access-rights
	JobObjectQuery = 0x0004
)

Variables

This section is empty.

Functions

func GetTickCount64 added in v0.30.6

func GetTickCount64() uint64

func IsProcessInJob added in v0.31.0

func IsProcessInJob(process windows.Handle, job windows.Handle, result *bool) error

func LocalFileTimeToFileTime

func LocalFileTimeToFileTime(localFileTime, utcFileTime *windows.Filetime) uint32

func OpenJobObject added in v0.31.0

func OpenJobObject(name string) (windows.Handle, error)

Types

type DynamicTimezoneInformation

type DynamicTimezoneInformation struct {
	Bias int32

	StandardDate                SYSTEMTIME
	StandardBias                int32
	DaylightName                [32]uint16
	DaylightDate                SYSTEMTIME
	DaylightBias                int32
	TimeZoneKeyName             [128]uint16
	DynamicDaylightTimeDisabled uint8 // BOOLEAN
	// contains filtered or unexported fields
}

DynamicTimezoneInformation contains the current dynamic daylight time settings. 📑 https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-dynamic_time_zone_information

func GetDynamicTimeZoneInformation

func GetDynamicTimeZoneInformation() (DynamicTimezoneInformation, error)

GetDynamicTimeZoneInformation retrieves the current dynamic daylight time settings. 📑 https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-getdynamictimezoneinformation

type JobObjectBasicAccountingInformation added in v0.31.0

type JobObjectBasicAccountingInformation struct {
	TotalUserTime             uint64
	TotalKernelTime           uint64
	ThisPeriodTotalUserTime   uint64
	ThisPeriodTotalKernelTime uint64
	TotalPageFaultCount       uint32
	TotalProcesses            uint32
	ActiveProcesses           uint32
	TotalTerminatedProcesses  uint32
}

type JobObjectBasicAndIOAccountingInformation added in v0.31.0

type JobObjectBasicAndIOAccountingInformation struct {
	BasicInfo JobObjectBasicAccountingInformation
	IoInfo    windows.IO_COUNTERS
}

JobObjectBasicAndIOAccountingInformation is a structure that contains both basic accounting information and I/O accounting information for a job object. It is used with the QueryInformationJobObject function. The structure is defined in the Windows API documentation. https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-jobobject_basic_and_io_accounting_information

type JobObjectBasicProcessIDList added in v0.31.0

type JobObjectBasicProcessIDList struct {
	NumberOfAssignedProcesses uint32
	NumberOfProcessIdsInList  uint32
	ProcessIdList             [1]uintptr
}

func (*JobObjectBasicProcessIDList) PIDs added in v0.31.0

func (p *JobObjectBasicProcessIDList) PIDs() []uint32

PIDs returns all the process Ids in the job object.

type JobObjectMemoryUsageInformation added in v0.31.0

type JobObjectMemoryUsageInformation struct {
	JobMemory         uint64
	PeakJobMemoryUsed uint64
}

type PROCESS_VM_COUNTERS added in v0.31.0

type PROCESS_VM_COUNTERS struct {
	PeakVirtualSize            uintptr
	VirtualSize                uintptr
	PageFaultCount             uint32
	PeakWorkingSetSize         uintptr
	WorkingSetSize             uintptr
	QuotaPeakPagedPoolUsage    uintptr
	QuotaPagedPoolUsage        uintptr
	QuotaPeakNonPagedPoolUsage uintptr
	QuotaNonPagedPoolUsage     uintptr
	PagefileUsage              uintptr
	PeakPagefileUsage          uintptr
	PrivateWorkingSetSize      uintptr
}

type SYSTEMTIME

type SYSTEMTIME struct {
	WYear         uint16
	WMonth        uint16
	WDayOfWeek    uint16
	WDay          uint16
	WHour         uint16
	WMinute       uint16
	WSecond       uint16
	WMilliseconds uint16
}

SYSTEMTIME contains a date and time. 📑 https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-systemtime

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL