kernel32

package
v0.0.0-...-bf00a48 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	MaxComputerNameLength                      = 31
	DeleteProcessAccessRight                   = 1
	ReadControlProcessAccessRight              = 0x00020000
	SynchronizeProcessAccessRight              = 0x00100000
	WriteDirectAccessControlProcessAccessRight = 0x00040000
	WriteOwnerProcessAccessControl             = 0x00080000
)

Variables

This section is empty.

Functions

func CloseHandle

func CloseHandle(hObject windows.Handle) (ok bool)

CloseHandle closes an open object handle. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx

func ClosePseudoConsole

func ClosePseudoConsole(hPC windows.HpCon) (err error)

ClosePseudoConsole closes a pseudoconsole from the given handle. See: https://docs.microsoft.com/en-us/windows/console/closepseudoconsole

func CreatePipe

func CreatePipe(hReadPipe *windows.Handle, hWritePipe *windows.Handle, lpPipeAttributes *windows.SecurityAttributes, nSize windows.Dword) (ok bool)

CreatePipe creates an anonymous pipe, and returns handles to the read and write ends of the pipe.

func CreateProcess

func CreateProcess(lpApplicationName *windows.LpcStr, lpCommandLine *windows.LpStr, lpProcessAtrributes *windows.SecurityAttributes, lpThreadAttributes *windows.SecurityAttributes, bInheritThreadHandles bool, dwCreationFlags windows.Dword, lpEnvironment *windows.LpVoid, lpCurrentDirectory *windows.LpcStr, lpStartupInfo *windows.StartupInfo, lpProcessInformation *windows.ProcessInformation) (ok bool)

CreateProcess creates a new process and its primary thread. The new process runs in the security context of the calling process. See: https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createprocessa

func CreatePseudoConsole

func CreatePseudoConsole(size *windows.COORD, hInput windows.Handle, hOutput windows.Handle, dwFlags windows.Dword, phPC *windows.HpCon) (err error)

CreatePseudoConsole creates a new pseudoconsole object for the calling process. See: https://docs.microsoft.com/en-us/windows/console/createpseudoconsole

func EnumProcesses

func EnumProcesses(lpidProcess *[]byte, cb windows.Dword, lpcbNeeded *windows.LpDword) (ok bool)

EnumProcesses retrieves the process identifier for each process object in the system.

func GetComputerName

func GetComputerName() (string, error)

GetComputerName retrieves the NetBIOS name of the local computer. This name is established at system startup, when the system reads it from the registry. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724295(v=vs.85).aspx

func GetCurrentProcess

func GetCurrentProcess() (pseudoHandle windows.Handle, err error)

GetCurrentProcess retrieves a pseudo handle for the current process. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683179%28v=vs.85%29.aspx

func GetLastError

func GetLastError() (err error)

GetLastError retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each other's last-error code.

func OpenProcess

func OpenProcess(dwDesiredAccess windows.Dword, bInheritHandle bool, dwProcessId windows.Dword) (handle windows.Handle)

OpenProcess opens an existing local process object.

func QueryProcessCycleTime

func QueryProcessCycleTime(handle windows.Handle, cycleTime *windows.PULong64) (err error)

QueryProcessCycleTime retrieves the sum of the cycle time of all threads of the specified process.

func ReadFile

func ReadFile(hFile windows.Handle, lpBuffer []byte, nNumberOfBytesToRead windows.Dword, lpOverlapped *windows.Overlapped) (ok bool)

ReadFile reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device. See: https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-readfile

func ResizePseudoConsole

func ResizePseudoConsole(hPC windows.HpCon, size *windows.COORD) (err error)

ResizePseudoConsole resizes the internal buffers for a pseudoconsole to the given size. See: https://docs.microsoft.com/en-us/windows/console/resizepseudoconsole

func TerminateProcess

func TerminateProcess(hProcess windows.Handle, uExitCode uint) (ok bool)

TerminateProcess terminates the specified process and all of its threads.

Types

type BackgroundProcess

type BackgroundProcess struct {
	BufferSize         windows.Dword
	ChildProcessHandle windows.Handle
	// contains filtered or unexported fields
}

func (*BackgroundProcess) CloseBackgroundProcess

func (bg *BackgroundProcess) CloseBackgroundProcess() error

func (*BackgroundProcess) CreateBackgroundProcess

func (bg *BackgroundProcess) CreateBackgroundProcess(lpCommandLine string) error

Jump to

Keyboard shortcuts

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