advapi32

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var Advapi32 = windows.NewLazySystemDLL("Advapi32.dll")

Functions

func CreateProcessWithLogon

func CreateProcessWithLogon(lpUsername *uint16, lpDomain *uint16, lpPassword *uint16, dwLogonFlags uint32, lpApplicationName *uint16, lpCommandLine *uint16, dwCreationFlags uint32, lpEnvironment uintptr, lpCurrentDirectory *uint16, lpStartupInfo *windows.StartupInfo, lpProcessInformation *windows.ProcessInformation) error

CreateProcessWithLogon 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. https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithlogonw

func CreateProcessWithTokenW

func CreateProcessWithTokenW(hToken, dwLogonFlags, lpApplicationName, lpCommandLine, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation uintptr) (err error)

CreateProcessWithTokenW creates a new process and its primary thread. The new process runs in the security context of the specified token. It can optionally load the user profile for the specified user. https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createprocesswithtokenw

func ImpersonateLoggedOnUser

func ImpersonateLoggedOnUser(hToken windows.Token) (err error)

ImpersonateLoggedOnUser lets the calling thread impersonate the security context of a logged-on user. The user is represented by a token handle. https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-impersonateloggedonuser

func LogonUser

func LogonUser(lpszUsername *uint16, lpszDomain *uint16, lpszPassword *uint16, dwLogonType uint32, dwLogonProvider uint32) (token *unsafe.Pointer, err error)

LogonUser attempts to log a user on to the local computer. The local computer is the computer from which LogonUser was called. You cannot use LogonUser to log on to a remote computer. You specify the user with a user name and domain and authenticate the user with a plaintext password. If the function succeeds, you receive a handle to a token that represents the logged-on user. You can then use this token handle to impersonate the specified user or, in most cases, to create a process that runs in the context of the specified user. https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-logonuserw

func LookupPrivilegeName

func LookupPrivilegeName(luid windows.LUID) (privilege string, err error)

LookupPrivilegeName retrieves the name that corresponds to the privilege represented on a specific system by a specified locally unique identifier (LUID). https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-lookupprivilegenamew

Types

This section is empty.

Jump to

Keyboard shortcuts

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