You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
win32api/win32api.go

147 lines
3.7 KiB
Go

package win32api
import (
"unsafe"
)
type (
ATOM uint16
BOOL int32
COLORREF uint32
DWM_FRAME_COUNT uint64
DWORD uint32
LPDWORD *uint32
DWORDLONG uint64
HACCEL HANDLE
HANDLE uintptr
HBITMAP HANDLE
HBRUSH HANDLE
HCURSOR HANDLE
HDC HANDLE
HDROP HANDLE
HDWP HANDLE
HENHMETAFILE HANDLE
HFONT HANDLE
HGDIOBJ HANDLE
HGLOBAL HANDLE
HGLRC HANDLE
HHOOK HANDLE
HICON HANDLE
HIMAGELIST HANDLE
HINSTANCE HANDLE
HKEY HANDLE
HKL HANDLE
HMENU HANDLE
HMODULE HANDLE
HMONITOR HANDLE
HPEN HANDLE
HRESULT int32
HRGN HANDLE
HRSRC HANDLE
HTHUMBNAIL HANDLE
HWND HANDLE
LPARAM uintptr
LPCVOID unsafe.Pointer
LPVOID unsafe.Pointer
LRESULT uintptr
LPCWSTR *uint16
PVOID unsafe.Pointer
QPC_TIME uint64
ULONG uint32
ULONG_PTR uintptr
WPARAM uintptr
WTS_CONNECTSTATE_CLASS int
TRACEHANDLE uintptr
TOKEN HANDLE
LPWSTR *uint16
TOKEN_TYPE int
SW int
SECURITY_IMPERSONATION_LEVEL int
WCHAR uint16
WORD uint16
USN int64
LARGE_INTEGER LONGLONG
LONGLONG int64
)
type WTS_SESSION_INFO struct {
SessionID HANDLE
WinStationName *uint16
State WTS_CONNECTSTATE_CLASS
}
const (
WTS_CURRENT_SERVER_HANDLE uintptr = 0
)
const (
WTSActive WTS_CONNECTSTATE_CLASS = iota
WTSConnected
WTSConnectQuery
WTSShadow
WTSDisconnected
WTSIdle
WTSListen
WTSReset
WTSDown
WTSInit
)
const (
SecurityAnonymous SECURITY_IMPERSONATION_LEVEL = iota
SecurityIdentification
SecurityImpersonation
SecurityDelegation
)
const (
TokenPrimary TOKEN_TYPE = iota + 1
TokenImpersonazion
)
const (
SW_HIDE SW = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_MAX = 1
)
const (
CREATE_UNICODE_ENVIRONMENT uint16 = 0x00000400
CREATE_NO_WINDOW = 0x08000000
CREATE_NEW_CONSOLE = 0x00000010
)
type StartupInfo struct {
Cb uint32
_ *uint16
Desktop *uint16
Title *uint16
X uint32
Y uint32
XSize uint32
YSize uint32
XCountChars uint32
YCountChars uint32
FillAttribute uint32
Flags uint32
ShowWindow uint16
_ uint16
_ *byte
StdInput HANDLE
StdOutput HANDLE
StdErr HANDLE
}
type ProcessInformation struct {
Process HANDLE
Thread HANDLE
ProcessId uint32
ThreadId uint32
}