Documentation ¶
Index ¶
- Constants
- func CloseHandle(hObject windows.Handle) (ok bool)
- func ClosePseudoConsole(hPC windows.HpCon) (err error)
- func CreatePipe(hReadPipe *windows.Handle, hWritePipe *windows.Handle, ...) (ok bool)
- func CreateProcess(lpApplicationName *windows.LpcStr, lpCommandLine *windows.LpStr, ...) (ok bool)
- func CreatePseudoConsole(size *windows.COORD, hInput windows.Handle, hOutput windows.Handle, ...) (err error)
- func EnumProcesses(lpidProcess *[]byte, cb windows.Dword, lpcbNeeded *windows.LpDword) (ok bool)
- func GetComputerName() (string, error)
- func GetCurrentProcess() (pseudoHandle windows.Handle, err error)
- func GetLastError() (err error)
- func OpenProcess(dwDesiredAccess windows.Dword, bInheritHandle bool, dwProcessId windows.Dword) (handle windows.Handle)
- func QueryProcessCycleTime(handle windows.Handle, cycleTime *windows.PULong64) (err error)
- func ReadFile(hFile windows.Handle, lpBuffer []byte, nNumberOfBytesToRead windows.Dword, ...) (ok bool)
- func ResizePseudoConsole(hPC windows.HpCon, size *windows.COORD) (err error)
- func TerminateProcess(hProcess windows.Handle, uExitCode uint) (ok bool)
- type BackgroundProcess
Constants ¶
const ( MaxComputerNameLength = 31 DeleteProcessAccessRight = 1 ReadControlProcessAccessRight = 0x00020000 SynchronizeProcessAccessRight = 0x00100000 WriteDirectAccessControlProcessAccessRight = 0x00040000 WriteOwnerProcessAccessControl = 0x00080000 )
Variables ¶
This section is empty.
Functions ¶
func CloseHandle ¶
CloseHandle closes an open object handle. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx
func ClosePseudoConsole ¶
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 ¶
EnumProcesses retrieves the process identifier for each process object in the system.
func GetComputerName ¶
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 ¶
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 ¶
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 ¶
ResizePseudoConsole resizes the internal buffers for a pseudoconsole to the given size. See: https://docs.microsoft.com/en-us/windows/console/resizepseudoconsole
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