Documentation
¶
Rendered for windows/amd64
Index ¶
- Constants
- func AssignProcessToJobObject(job syscall.Handle, process syscall.Handle) error
- func CloseWindowStation(winsta Hwinsta) error
- func CreateJobObject(sa *syscall.SecurityAttributes, name *uint16) (syscall.Handle, error)
- func CreateProcessAsUser(token syscall.Handle, applicationName *uint16, commandLine *uint16, ...) error
- func CreateProcessWithLogonW(username *uint16, domain *uint16, password *uint16, logonFlags uint32, ...) error
- func CreateRemoteThread(process syscall.Handle, sa *syscall.SecurityAttributes, stackSize uint32, ...) (syscall.Handle, uint32, error)
- func GetCurrentThreadId() uint32
- func GetModuleHandle(name *uint16) (syscall.Handle, error)
- func GetProcessAffinityMask(process syscall.Handle) (processMask, systemMask uint64, err error)
- func GetUserObjectInformation(obj syscall.Handle, index int, info unsafe.Pointer, length uint32) (uint32, error)
- func GetUserObjectName(obj syscall.Handle) (string, error)
- func IsWindows8OrGreater() bool
- func ListToEnvironmentBlock(list *[]string) *uint16
- func LoadUserProfile(token syscall.Handle, pinfo *ProfileInfo) error
- func LogonUser(username *uint16, domain *uint16, password *uint16, logonType uint32, ...) (token syscall.Handle, err error)
- func MakeInheritSa() *syscall.SecurityAttributes
- func QueryInformationJobObject(job syscall.Handle, infoclass uint32, info unsafe.Pointer, length uint32) (uint32, error)
- func ResumeThread(thread syscall.Handle) (suspendCount int, err error)
- func SetInformationJobObject(job syscall.Handle, infoclass uint32, info unsafe.Pointer, length uint32) error
- func SetInheritHandle(h syscall.Handle, inherit bool) error
- func SetJobObjectBasicUiRestrictions(job syscall.Handle, info *JobObjectBasicUiRestrictions) error
- func SetJobObjectExtendedLimitInformation(job syscall.Handle, info *JobObjectExtendedLimitInformation) error
- func SetProcessAffinityMask(process syscall.Handle, mask uint64) error
- func SetProcessWindowStation(winsta Hwinsta) error
- func SetThreadDesktop(desk Hdesk) error
- func StringPtrToUTF16Ptr(src *string) (result *uint16)
- func UnloadUserProfile(token, profile syscall.Handle) error
- func VerSetConditionMask(lConditionMask uint64, typeBitMask uint32, conditionMask uint8) uint64
- func VerifyWindowsInfoW(vi OSVersionInfoEx, typeMask uint32, conditionMask uint64) (bool, error)
- func VirtualAllocEx(process syscall.Handle, addr uintptr, size, allocType, protect uint32) (uintptr, error)
- func VirtualFreeEx(process syscall.Handle, addr uintptr, size, freeType uint32) error
- func WriteProcessMemory(process syscall.Handle, addr uintptr, buf unsafe.Pointer, size uint32) (uint32, error)
- type Hdesk
- type Hwinsta
- type IoCounters
- type JobObjectBasicAccountingInformation
- type JobObjectBasicLimitInformation
- type JobObjectBasicUiRestrictions
- type JobObjectExtendedLimitInformation
- type OSVersionInfoEx
- type ProcessMemoryCountersEx
- type ProfileInfo
Constants ¶
View Source
const ( CREATE_BREAKAWAY_FROM_JOB = 0x01000000 CREATE_NEW_CONSOLE = 0x00000010 CREATE_NEW_PROCESS_GROUP = 0x00000200 CREATE_SUSPENDED = 0x00000004 LOGON_WITH_PROFILE = 0x00000001 STARTF_FORCEOFFFEEDBACK = 0x00000080 FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000 LOGON32_PROVIDER_DEFAULT = 0 LOGON32_PROVIDER_WINNT35 = 1 LOGON32_PROVIDER_WINNT40 = 2 LOGON32_PROVIDER_WINNT50 = 3 LOGON32_LOGON_INTERACTIVE = 2 LOGON32_LOGON_NETWORK = 3 LOGON32_LOGON_BATCH = 4 LOGON32_LOGON_SERVICE = 5 LOGON32_LOGON_UNLOCK = 7 LOGON32_LOGON_NETWORK_CLEARTEXT = 8 LOGON32_LOGON_NEW_CREDENTIALS = 9 MAXIMUM_ALLOWED = 0x2000000 PI_NOUI = 1 VER_BUILDNUMBER = 0x0000004 VER_MAJORVERSION = 0x0000002 VER_MINORVERSION = 0x0000001 VER_PLATFORMID = 0x0000008 VER_PRODUCT_TYPE = 0x0000080 VER_SERVICEPACKMAJOR = 0x0000020 VER_SERVICEPACKMINOR = 0x0000010 VER_SUITENAME = 0x0000040 VER_EQUAL = 1 VER_GREATER = 2 VER_GREATER_EQUAL = 3 VER_LESS = 4 VER_LESS_EQUAL = 5 ERROR_OLD_WIN_VERSION syscall.Errno = 1150 )
View Source
const ( JOB_OBJECT_UILIMIT_DESKTOP = 0x40 JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = 0x10 JOB_OBJECT_UILIMIT_EXITWINDOWS = 0x80 JOB_OBJECT_UILIMIT_GLOBALATOMS = 0x20 JOB_OBJECT_UILIMIT_HANDLES = 1 JOB_OBJECT_UILIMIT_READCLIPBOARD = 2 JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 8 JOB_OBJECT_UILIMIT_WRITECLIPBOARD = 4 )
View Source
const ( JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x2000 JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 0x400 JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 8 JOB_OBJECT_LIMIT_JOB_MEMORY = 0x200 JOB_OBJECT_LIMIT_JOB_TIME = 4 JOB_OBJECT_LIMIT_PROCESS_MEMORY = 0x100 JOB_OBJECT_LIMIT_PROCESS_TIME = 2 JOB_OBJECT_LIMIT_WORKINGSET = 1 JOB_OBJECT_LIMIT_AFFINITY = 0x00000010 )
View Source
const ( MEM_COMMIT = 0x00001000 PAGE_READWRITE = 0x04 )
View Source
const (
MEM_RELEASE = 0x8000
)
View Source
const (
UOI_NAME = 2
)
Variables ¶
This section is empty.
Functions ¶
func CloseWindowStation ¶
func CreateJobObject ¶
func CreateProcessAsUser ¶
func CreateProcessAsUser( token syscall.Handle, applicationName *uint16, commandLine *uint16, procSecurity *syscall.SecurityAttributes, threadSecurity *syscall.SecurityAttributes, inheritHandles bool, creationFlags uint32, environment *uint16, currentDirectory *uint16, startupInfo *syscall.StartupInfo, processInformation *syscall.ProcessInformation) error
func CreateProcessWithLogonW ¶
func CreateProcessWithLogonW( username *uint16, domain *uint16, password *uint16, logonFlags uint32, applicationName *uint16, commandLine *uint16, creationFlags uint32, environment *uint16, currentDirectory *uint16, startupInfo *syscall.StartupInfo, processInformation *syscall.ProcessInformation) error
func CreateRemoteThread ¶
func GetCurrentThreadId ¶
func GetCurrentThreadId() uint32
func GetProcessAffinityMask ¶
func IsWindows8OrGreater ¶
func IsWindows8OrGreater() bool
func ListToEnvironmentBlock ¶
func LoadUserProfile ¶
func LoadUserProfile(token syscall.Handle, pinfo *ProfileInfo) error
func MakeInheritSa ¶
func MakeInheritSa() *syscall.SecurityAttributes
func SetInformationJobObject ¶
func SetJobObjectBasicUiRestrictions ¶
func SetJobObjectBasicUiRestrictions(job syscall.Handle, info *JobObjectBasicUiRestrictions) error
func SetJobObjectExtendedLimitInformation ¶
func SetJobObjectExtendedLimitInformation(job syscall.Handle, info *JobObjectExtendedLimitInformation) error
func SetProcessAffinityMask ¶
func SetProcessWindowStation ¶
func SetThreadDesktop ¶
func StringPtrToUTF16Ptr ¶
func UnloadUserProfile ¶
func VerSetConditionMask ¶
func VerifyWindowsInfoW ¶
func VerifyWindowsInfoW(vi OSVersionInfoEx, typeMask uint32, conditionMask uint64) (bool, error)
func VirtualAllocEx ¶
func VirtualFreeEx ¶
Types ¶
type IoCounters ¶
type JobObjectBasicAccountingInformation ¶
type JobObjectBasicAccountingInformation struct { TotalUserTime uint64 TotalKernelTime uint64 ThisPeriodTotalUserTime uint64 ThisPeriodTotalKernelTime uint64 TotalPageFaultCount uint32 TotalProcesses uint32 ActiveProcesses uint32 TotalTerminatedProcesses uint32 }
func GetJobObjectBasicAccountingInformation ¶
func GetJobObjectBasicAccountingInformation(job syscall.Handle) (*JobObjectBasicAccountingInformation, error)
type JobObjectBasicLimitInformation ¶
type JobObjectBasicLimitInformation struct { PerProcessUserTimeLimit uint64 // LARGE_INTEGER PerJobUserTimeLimit uint64 // LARGE_INTEGER LimitFlags uint32 // DWORD MinimumWorkingSetSize uintptr // SIZE_T MaximumWorkingSetSize uintptr // SIZE_T ActiveProcessLimit uint32 // DWORD Affinity uintptr // ULONG_PTR PriorityClass uint32 // DWORD SchedulingClass uint32 // DWORD }
type JobObjectBasicUiRestrictions ¶
type JobObjectBasicUiRestrictions struct {
UIRestrictionClass uint32
}
type JobObjectExtendedLimitInformation ¶
type JobObjectExtendedLimitInformation struct { BasicLimitInformation JobObjectBasicLimitInformation IoInfo IoCounters ProcessMemoryLimit uintptr // SIZE_T JobMemoryLimit uintptr // SIZE_T PeakProcessMemoryUsed uintptr // SIZE_T PeakJobMemoryUsed uintptr // SIZE_T }
func GetJobObjectExtendedLimitInformation ¶
func GetJobObjectExtendedLimitInformation(job syscall.Handle) (*JobObjectExtendedLimitInformation, error)
type OSVersionInfoEx ¶
type ProcessMemoryCountersEx ¶
type ProcessMemoryCountersEx struct { Cb uint32 // DWORD PageFaultCount uint32 // DWORD PeakWorkingSetSize uintptr // SIZE_T WorkingSetSize uintptr // SIZE_T QuotaPeakPagedPoolUsage uintptr // SIZE_T QuotaPagedPoolUsage uintptr // SIZE_T QuotaPeakNonPagedPoolUsage uintptr // SIZE_T QuotaNonPagedPoolUsage uintptr // SIZE_T PagefileUsage uintptr // SIZE_T PeakPagefileUsage uintptr // SIZE_T PrivateUsage uintptr // SIZE_T }
func GetProcessMemoryInfo ¶
func GetProcessMemoryInfo(process syscall.Handle) (pmc *ProcessMemoryCountersEx, err error)
Click to show internal directories.
Click to hide internal directories.