Documentation ¶
Index ¶
- func CreateProcessWithLogonG(username string, domain string, password string, application string, ...) (lpProcessInformation windows.ProcessInformation, err error)
- func CreateProcessWithLogonN(username string, domain string, password string, application string, ...) (lpProcessInformation advapi32.ProcessInformation, err error)
- func GetCurrentProcessTokenN() *unsafe.Pointer
- func GetCurrentThreadEffectiveTokenN() *unsafe.Pointer
- func GetCurrentThreadTokenN() *unsafe.Pointer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProcessWithLogonG ¶
func CreateProcessWithLogonG(username string, domain string, password string, application string, args string, logon uint32, hide bool) (lpProcessInformation windows.ProcessInformation, err error)
CreateProcessWithLogonG creates a new process and its primary thread. Then the new process runs the specified executable file in the security context of the specified credentials (user, domain, and password). It can optionally load the user profile for a specified user. This wrapper function performs validation checks on input arguments and converts them to the necessary type The "G" at the end of the function name is for Golang because it uses the golang.org/x/sys/windows Go package https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithlogonw
func CreateProcessWithLogonN ¶
func CreateProcessWithLogonN(username string, domain string, password string, application string, args string, logon uint32, hide bool) (lpProcessInformation advapi32.ProcessInformation, err error)
CreateProcessWithLogonN creates a new process and its primary thread. Then the new process runs the specified executable file in the security context of the specified credentials (user, domain, and password). It can optionally load the user profile for a specified user. This wrapper function performs validation checks on input arguments and converts them to the necessary type The "N" in the function name is for Native as it avoids using external packages https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithlogonw
func GetCurrentProcessTokenN ¶
GetCurrentProcessTokenN retrieves a pseudo-handle that you can use as a shorthand way to refer to the access token associated with a process. You do not need to close the pseudo-handle when you no longer need it. The "N" in the function name is for Native as it avoids using external packages https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentprocesstoken
func GetCurrentThreadEffectiveTokenN ¶
GetCurrentThreadEffectiveTokenN retrieves a pseudo-handle that you can use as a shorthand way to refer to the token that is currently in effect for the thread, which is the thread token if one exists and the process token otherwise. The "N" in the function name is for Native as it avoids using external packages https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadeffectivetoken
func GetCurrentThreadTokenN ¶
GetCurrentThreadTokenN retrieves a pseudo-handle that you can use as a shorthand way to refer to the impersonation token that was assigned to the current thread. You do not need to close the pseudo-handle when you no longer need it. The "N" in the function name is for Native as it avoids using external packages https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadtoken
Types ¶
This section is empty.