win32

package module
v0.0.0-...-25b01e7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 4 Imported by: 1

README

win32-toolkit

This is a basic wrapper around bits of the Windows API. I put it together for setup and testing of https://github.com/bbredesen/go-vk. It is mostly limited to the types, constants and functions that I needed to get a window open and send window messages through to other Go programs. It is NOT inteded to be a broadly functional Go wrapper around the Windows API.

Documentation

Index

Constants

View Source
const (
	CS_OWNDC   uint32 = 0x0020
	CS_VREDRAW uint32 = 0x0001
	CS_HREDRAW uint32 = 0x0002

	SW_SHOW        uint32 = 5
	SW_USE_DEFAULT uint32 = 0x80000000
)
View Source
const (
	WS_MAXIMIZE_BOX uint32 = 0x00010000
	WS_MINIMIZEBOX  uint32 = 0x00020000
	WS_THICKFRAME   uint32 = 0x00040000
	WS_SYSMENU      uint32 = 0x00080000
	WS_CAPTION      uint32 = 0x00C00000
	WS_VISIBLE      uint32 = 0x10000000

	WS_OVERLAPPEDWINDOW uint32 = 0x00CF0000
)
View Source
const (
	PM_NOREMOVE uint32 = 0x0000
	PM_REMOVE   uint32 = 0x0001
	PM_NOYIELD  uint32 = 0x0002
)
View Source
const (
	COLOR_WINDOW uintptr = 5
)
View Source
const (
	IDC_ARROW uintptr = 32512
)

Variables

This section is empty.

Functions

func CreateWindowExW

func CreateWindowExW(exStyle uint32,
	className, windowName string,
	style uint32,
	x, y, width, height uint32,
	parent, menu, instance HInstance,
	pParam unsafe.Pointer,
) (HWnd, Win32Error)

func DefWindowProcW

func DefWindowProcW(hwnd HWnd, msg Msg, wParam, lParam uintptr) uintptr

func DispatchMessage

func DispatchMessage(pMsg *MSG) int32

func DispatchMessageW

func DispatchMessageW(pMsg *MSG) int32

func GetLastError

func GetLastError() uint32

func GetModuleHandleExW

func GetModuleHandleExW(flags uint32, moduleName string) (HInstance, Win32Error)

func LoadCursor

func LoadCursor(hInstance HInstance, cursorName uintptr) (HCursor, Win32Error)

func PostQuitMessage

func PostQuitMessage(exitCode int32)

func TranslateMessage

func TranslateMessage(pMsg *MSG) int32

Types

type HBrush

type HBrush Handle

type HCursor

type HCursor Handle

type HIcon

type HIcon Handle

type HInstance

type HInstance Handle

type HModule

type HModule HInstance

type HWnd

type HWnd Handle

type Handle

type Handle windows.Handle
const NULL_HANDLE Handle = Handle(0)

type MSG

type MSG struct {
	Hwnd           HWnd
	Message        uint32
	WParam, LParam uintptr
	Time           uint32
	Pt             POINT
	// contains filtered or unexported fields
}

type Msg

type Msg uint32
const (
	WM_NULL                   Msg = 0x0000
	WM_CREATE                 Msg = 0x0001
	WM_DESTROY                Msg = 0x0002
	WM_MOVE                   Msg = 0x0003
	WM_SIZE                   Msg = 0x0005
	WM_ACTIVATE               Msg = 0x0006
	WM_SETFOCUS               Msg = 0x0007
	WM_KILLFOCUS              Msg = 0x0008
	WM_ENABLE                 Msg = 0x000A
	WM_SETREDRAW              Msg = 0x000B
	WM_SETTEXT                Msg = 0x000C
	WM_GETTEXT                Msg = 0x000D
	WM_GETTEXTLENGTH          Msg = 0x000E
	WM_PAINT                  Msg = 0x000F
	WM_CLOSE                  Msg = 0x0010
	WM_QUERYENDSESSION        Msg = 0x0011
	WM_QUIT                   Msg = 0x0012
	WM_QUERYOPEN              Msg = 0x0013
	WM_ERASEBKGND             Msg = 0x0014
	WM_SYSCOLORCHANGE         Msg = 0x0015
	WM_ENDSESSION             Msg = 0x0016
	WM_SHOWWINDOW             Msg = 0x0018
	WM_WININICHANGE           Msg = 0x001A
	WM_SETTINGCHANGE          Msg = WM_WININICHANGE
	WM_DEVMODECHANGE          Msg = 0x001B
	WM_ACTIVATEAPP            Msg = 0x001C
	WM_FONTCHANGE             Msg = 0x001D
	WM_TIMECHANGE             Msg = 0x001E
	WM_CANCELMODE             Msg = 0x001F
	WM_SETCURSOR              Msg = 0x0020
	WM_MOUSEACTIVATE          Msg = 0x0021
	WM_CHILDACTIVATE          Msg = 0x0022
	WM_QUEUESYNC              Msg = 0x0023
	WM_GETMINMAXINFO          Msg = 0x0024
	WM_PAINTICON              Msg = 0x0026
	WM_ICONERASEBKGND         Msg = 0x0027
	WM_NEXTDLGCTL             Msg = 0x0028
	WM_SPOOLERSTATUS          Msg = 0x002A
	WM_DRAWITEM               Msg = 0x002B
	WM_MEASUREITEM            Msg = 0x002C
	WM_DELETEITEM             Msg = 0x002D
	WM_VKEYTOITEM             Msg = 0x002E
	WM_CHARTOITEM             Msg = 0x002F
	WM_SETFONT                Msg = 0x0030
	WM_GETFONT                Msg = 0x0031
	WM_SETHOTKEY              Msg = 0x0032
	WM_GETHOTKEY              Msg = 0x0033
	WM_QUERYDRAGICON          Msg = 0x0037
	WM_COMPAREITEM            Msg = 0x0039
	WM_GETOBJECT              Msg = 0x003D
	WM_COMPACTING             Msg = 0x0041
	WM_COMMNOTIFY             Msg = 0x0044 /* no longer suported */
	WM_WINDOWPOSCHANGING      Msg = 0x0046
	WM_WINDOWPOSCHANGED       Msg = 0x0047
	WM_POWER                  Msg = 0x0048
	WM_COPYDATA               Msg = 0x004A
	WM_CANCELJOURNAL          Msg = 0x004B
	WM_NOTIFY                 Msg = 0x004E
	WM_INPUTLANGCHANGEREQUEST Msg = 0x0050
	WM_INPUTLANGCHANGE        Msg = 0x0051
	WM_TCARD                  Msg = 0x0052
	WM_HELP                   Msg = 0x0053
	WM_USERCHANGED            Msg = 0x0054
	WM_NOTIFYFORMAT           Msg = 0x0055
	WM_CONTEXTMENU            Msg = 0x007B
	WM_STYLECHANGING          Msg = 0x007C
	WM_STYLECHANGED           Msg = 0x007D
	WM_DISPLAYCHANGE          Msg = 0x007E
	WM_GETICON                Msg = 0x007F
	WM_SETICON                Msg = 0x0080
	WM_NCCREATE               Msg = 0x0081
	WM_NCDESTROY              Msg = 0x0082
	WM_NCCALCSIZE             Msg = 0x0083
	WM_NCHITTEST              Msg = 0x0084
	WM_NCPAINT                Msg = 0x0085
	WM_NCACTIVATE             Msg = 0x0086
	WM_GETDLGCODE             Msg = 0x0087
	WM_SYNCPAINT              Msg = 0x0088
	WM_NCMOUSEMOVE            Msg = 0x00A0
	WM_NCLBUTTONDOWN          Msg = 0x00A1
	WM_NCLBUTTONUP            Msg = 0x00A2
	WM_NCLBUTTONDBLCLK        Msg = 0x00A3
	WM_NCRBUTTONDOWN          Msg = 0x00A4
	WM_NCRBUTTONUP            Msg = 0x00A5
	WM_NCRBUTTONDBLCLK        Msg = 0x00A6
	WM_NCMBUTTONDOWN          Msg = 0x00A7
	WM_NCMBUTTONUP            Msg = 0x00A8
	WM_NCMBUTTONDBLCLK        Msg = 0x00A9
	WM_NCXBUTTONDOWN          Msg = 0x00AB
	WM_NCXBUTTONUP            Msg = 0x00AC
	WM_NCXBUTTONDBLCLK        Msg = 0x00AD
	WM_INPUT_DEVICE_CHANGE    Msg = 0x00FE
	WM_INPUT                  Msg = 0x00FF
	WM_KEYFIRST               Msg = 0x0100
	WM_KEYDOWN                Msg = 0x0100
	WM_KEYUP                  Msg = 0x0101
	WM_CHAR                   Msg = 0x0102
	WM_DEADCHAR               Msg = 0x0103
	WM_SYSKEYDOWN             Msg = 0x0104
	WM_SYSKEYUP               Msg = 0x0105
	WM_SYSCHAR                Msg = 0x0106
	WM_SYSDEADCHAR            Msg = 0x0107
	WM_UNICHAR                Msg = 0x0109
	WM_KEYLAST                Msg = 0x0109
	WM_IME_STARTCOMPOSITION   Msg = 0x010D
	WM_IME_ENDCOMPOSITION     Msg = 0x010E
	WM_IME_COMPOSITION        Msg = 0x010F
	WM_IME_KEYLAST            Msg = 0x010F
	WM_INITDIALOG             Msg = 0x0110
	WM_COMMAND                Msg = 0x0111
	WM_SYSCOMMAND             Msg = 0x0112
	WM_TIMER                  Msg = 0x0113
	WM_HSCROLL                Msg = 0x0114
	WM_VSCROLL                Msg = 0x0115
	WM_INITMENU               Msg = 0x0116
	WM_INITMENUPOPUP          Msg = 0x0117
	WM_GESTURE                Msg = 0x0119
	WM_GESTURENOTIFY          Msg = 0x011A
	WM_MENUSELECT             Msg = 0x011F
	WM_MENUCHAR               Msg = 0x0120
	WM_ENTERIDLE              Msg = 0x0121
	WM_MENURBUTTONUP          Msg = 0x0122
	WM_MENUDRAG               Msg = 0x0123
	WM_MENUGETOBJECT          Msg = 0x0124
	WM_UNINITMENUPOPUP        Msg = 0x0125
	WM_MENUCOMMAND            Msg = 0x0126
	WM_CHANGEUISTATE          Msg = 0x0127
	WM_UPDATEUISTATE          Msg = 0x0128
	WM_QUERYUISTATE           Msg = 0x0129
	WM_CTLCOLORMSGBOX         Msg = 0x0132
	WM_CTLCOLOREDIT           Msg = 0x0133
	WM_CTLCOLORLISTBOX        Msg = 0x0134
	WM_CTLCOLORBTN            Msg = 0x0135
	WM_CTLCOLORDLG            Msg = 0x0136
	WM_CTLCOLORSCROLLBAR      Msg = 0x0137
	WM_CTLCOLORSTATIC         Msg = 0x0138
	// WM_MOUSEFIRST             Msg = 0x0200
	WM_MOUSEMOVE     Msg = 0x0200
	WM_LBUTTONDOWN   Msg = 0x0201
	WM_LBUTTONUP     Msg = 0x0202
	WM_LBUTTONDBLCLK Msg = 0x0203
	WM_RBUTTONDOWN   Msg = 0x0204
	WM_RBUTTONUP     Msg = 0x0205
	WM_RBUTTONDBLCLK Msg = 0x0206
	WM_MBUTTONDOWN   Msg = 0x0207
	WM_MBUTTONUP     Msg = 0x0208
	WM_MBUTTONDBLCLK Msg = 0x0209
	WM_MOUSEWHEEL    Msg = 0x020A
	WM_XBUTTONDOWN   Msg = 0x020B
	WM_XBUTTONUP     Msg = 0x020C
	WM_XBUTTONDBLCLK Msg = 0x020D
	WM_MOUSEHWHEEL   Msg = 0x020E
	// WM_MOUSELAST              Msg = 0x020E
	// WM_MOUSELAST                   Msg = 0x020D
	// WM_MOUSELAST                   Msg = 0x020A
	// WM_MOUSELAST                   Msg = 0x0209
	WM_PARENTNOTIFY                   Msg = 0x0210
	WM_ENTERMENULOOP                  Msg = 0x0211
	WM_EXITMENULOOP                   Msg = 0x0212
	WM_NEXTMENU                       Msg = 0x0213
	WM_SIZING                         Msg = 0x0214
	WM_CAPTURECHANGED                 Msg = 0x0215
	WM_MOVING                         Msg = 0x0216
	WM_POWERBROADCAST                 Msg = 0x0218
	WM_DEVICECHANGE                   Msg = 0x0219
	WM_MDICREATE                      Msg = 0x0220
	WM_MDIDESTROY                     Msg = 0x0221
	WM_MDIACTIVATE                    Msg = 0x0222
	WM_MDIRESTORE                     Msg = 0x0223
	WM_MDINEXT                        Msg = 0x0224
	WM_MDIMAXIMIZE                    Msg = 0x0225
	WM_MDITILE                        Msg = 0x0226
	WM_MDICASCADE                     Msg = 0x0227
	WM_MDIICONARRANGE                 Msg = 0x0228
	WM_MDIGETACTIVE                   Msg = 0x0229
	WM_MDISETMENU                     Msg = 0x0230
	WM_ENTERSIZEMOVE                  Msg = 0x0231
	WM_EXITSIZEMOVE                   Msg = 0x0232
	WM_DROPFILES                      Msg = 0x0233
	WM_MDIREFRESHMENU                 Msg = 0x0234
	WM_POINTERDEVICECHANGE            Msg = 0x238
	WM_POINTERDEVICEINRANGE           Msg = 0x239
	WM_POINTERDEVICEOUTOFRANGE        Msg = 0x23A
	WM_TOUCH                          Msg = 0x0240
	WM_NCPOINTERUPDATE                Msg = 0x0241
	WM_NCPOINTERDOWN                  Msg = 0x0242
	WM_NCPOINTERUP                    Msg = 0x0243
	WM_POINTERUPDATE                  Msg = 0x0245
	WM_POINTERDOWN                    Msg = 0x0246
	WM_POINTERUP                      Msg = 0x0247
	WM_POINTERENTER                   Msg = 0x0249
	WM_POINTERLEAVE                   Msg = 0x024A
	WM_POINTERACTIVATE                Msg = 0x024B
	WM_POINTERCAPTURECHANGED          Msg = 0x024C
	WM_TOUCHHITTESTING                Msg = 0x024D
	WM_POINTERWHEEL                   Msg = 0x024E
	WM_POINTERHWHEEL                  Msg = 0x024F
	WM_IME_SETCONTEXT                 Msg = 0x0281
	WM_IME_NOTIFY                     Msg = 0x0282
	WM_IME_CONTROL                    Msg = 0x0283
	WM_IME_COMPOSITIONFULL            Msg = 0x0284
	WM_IME_SELECT                     Msg = 0x0285
	WM_IME_CHAR                       Msg = 0x0286
	WM_IME_REQUEST                    Msg = 0x0288
	WM_IME_KEYDOWN                    Msg = 0x0290
	WM_IME_KEYUP                      Msg = 0x0291
	WM_MOUSEHOVER                     Msg = 0x02A1
	WM_MOUSELEAVE                     Msg = 0x02A3
	WM_NCMOUSEHOVER                   Msg = 0x02A0
	WM_NCMOUSELEAVE                   Msg = 0x02A2
	WM_WTSSESSION_CHANGE              Msg = 0x02B1
	WM_TABLET_FIRST                   Msg = 0x02c0
	WM_TABLET_LAST                    Msg = 0x02df
	WM_DPICHANGED                     Msg = 0x02E0
	WM_CUT                            Msg = 0x0300
	WM_COPY                           Msg = 0x0301
	WM_PASTE                          Msg = 0x0302
	WM_CLEAR                          Msg = 0x0303
	WM_UNDO                           Msg = 0x0304
	WM_RENDERFORMAT                   Msg = 0x0305
	WM_RENDERALLFORMATS               Msg = 0x0306
	WM_DESTROYCLIPBOARD               Msg = 0x0307
	WM_DRAWCLIPBOARD                  Msg = 0x0308
	WM_PAINTCLIPBOARD                 Msg = 0x0309
	WM_VSCROLLCLIPBOARD               Msg = 0x030A
	WM_SIZECLIPBOARD                  Msg = 0x030B
	WM_ASKCBFORMATNAME                Msg = 0x030C
	WM_CHANGECBCHAIN                  Msg = 0x030D
	WM_HSCROLLCLIPBOARD               Msg = 0x030E
	WM_QUERYNEWPALETTE                Msg = 0x030F
	WM_PALETTEISCHANGING              Msg = 0x0310
	WM_PALETTECHANGED                 Msg = 0x0311
	WM_HOTKEY                         Msg = 0x0312
	WM_PRINT                          Msg = 0x0317
	WM_PRINTCLIENT                    Msg = 0x0318
	WM_APPCOMMAND                     Msg = 0x0319
	WM_THEMECHANGED                   Msg = 0x031A
	WM_CLIPBOARDUPDATE                Msg = 0x031D
	WM_DWMCOMPOSITIONCHANGED          Msg = 0x031E
	WM_DWMNCRENDERINGCHANGED          Msg = 0x031F
	WM_DWMCOLORIZATIONCOLORCHANGED    Msg = 0x0320
	WM_DWMWINDOWMAXIMIZEDCHANGE       Msg = 0x0321
	WM_DWMSENDICONICTHUMBNAIL         Msg = 0x0323
	WM_DWMSENDICONICLIVEPREVIEWBITMAP Msg = 0x0326
	WM_GETTITLEBARINFOEX              Msg = 0x033F
	WM_HANDHELDFIRST                  Msg = 0x0358
	WM_HANDHELDLAST                   Msg = 0x035F
	WM_AFXFIRST                       Msg = 0x0360
	WM_AFXLAST                        Msg = 0x037F
	WM_PENWINFIRST                    Msg = 0x0380
	WM_PENWINLAST                     Msg = 0x038F
	WM_APP                            Msg = 0x8000
)

func (Msg) String

func (i Msg) String() string

type POINT

type POINT struct {
	// contains filtered or unexported fields
}

type Rect

type Rect struct {
	Left, Top, Right, Bottom int32
}

type WNDCLASSEXW

type WNDCLASSEXW struct {
	Size       uint32
	Style      uint32
	WndProc    uintptr
	ClsExtra   int32
	WndExtra   int32
	Instance   HInstance
	Icon       HIcon
	Cursor     HCursor
	Background HBrush
	MenuName   *uint16
	ClassName  *uint16
	IconSm     HIcon
}

type Win32Error

type Win32Error uint32
const (
	// The operation completed successfully.
	ERROR_SUCCESS Win32Error = 1
	// Incorrect function.
	ERROR_INVALID_FUNCTION Win32Error = 2
	// The system cannot find the file specified.
	ERROR_FILE_NOT_FOUND Win32Error = 3
	// The system cannot find the path specified.
	ERROR_PATH_NOT_FOUND Win32Error = 4
	// The system cannot open the file.
	ERROR_TOO_MANY_OPEN_FILES Win32Error = 5
	// Access is denied.
	ERROR_ACCESS_DENIED Win32Error = 6
	// The handle is invalid.
	ERROR_INVALID_HANDLE Win32Error = 7
	// The storage control blocks were destroyed.
	ERROR_ARENA_TRASHED Win32Error = 8
	// Not enough storage is available to process this command.
	ERROR_NOT_ENOUGH_MEMORY Win32Error = 9
	// The storage control block address is invalid.
	ERROR_INVALID_BLOCK Win32Error = 10
	// The environment is incorrect.
	ERROR_BAD_ENVIRONMENT Win32Error = 11
	// An attempt was made to load a program with an incorrect format.
	ERROR_BAD_FORMAT Win32Error = 12
	// The access code is invalid.
	ERROR_INVALID_ACCESS Win32Error = 13
	// The data is invalid.
	ERROR_INVALID_DATA Win32Error = 14
	// Not enough storage is available to complete this operation.
	ERROR_OUTOFMEMORY Win32Error = 15
	// The system cannot find the drive specified.
	ERROR_INVALID_DRIVE Win32Error = 16
	// The directory cannot be removed.
	ERROR_CURRENT_DIRECTORY Win32Error = 17
	// The system cannot move the file to a different disk drive.
	ERROR_NOT_SAME_DEVICE Win32Error = 18
	// There are no more files.
	ERROR_NO_MORE_FILES Win32Error = 19
	// The media is write protected.
	ERROR_WRITE_PROTECT Win32Error = 20
	// The system cannot find the device specified.
	ERROR_BAD_UNIT Win32Error = 21
	// The device is not ready.
	ERROR_NOT_READY Win32Error = 22
	// The device does not recognize the command.
	ERROR_BAD_COMMAND Win32Error = 23
	// Data error (cyclic redundancy check).
	ERROR_CRC Win32Error = 24
	// The program issued a command but the command length is incorrect.
	ERROR_BAD_LENGTH Win32Error = 25
	// The drive cannot locate a specific area or track on the disk.
	ERROR_SEEK Win32Error = 26
	// The specified disk or diskette cannot be accessed.
	ERROR_NOT_DOS_DISK Win32Error = 27
	// The drive cannot find the sector requested.
	ERROR_SECTOR_NOT_FOUND Win32Error = 28
	// The printer is out of paper.
	ERROR_OUT_OF_PAPER Win32Error = 29
	// The system cannot write to the specified device.
	ERROR_WRITE_FAULT Win32Error = 30
	// The system cannot read from the specified device.
	ERROR_READ_FAULT Win32Error = 31
	// A device attached to the system is not functioning.
	ERROR_GEN_FAILURE Win32Error = 32
	// The process cannot access the file because it is being used by another process.
	ERROR_SHARING_VIOLATION Win32Error = 33
	// The process cannot access the file because another process has locked a portion of the file.
	ERROR_LOCK_VIOLATION Win32Error = 34
	// The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1.
	ERROR_WRONG_DISK Win32Error = 36
	// Too many files opened for sharing.
	ERROR_SHARING_BUFFER_EXCEEDED Win32Error = 38
	// Reached the end of the file.
	ERROR_HANDLE_EOF Win32Error = 39
	// The disk is full.
	ERROR_HANDLE_DISK_FULL Win32Error = 50
	// The network request is not supported.
	ERROR_NOT_SUPPORTED Win32Error = 51
	// The remote computer is not available.
	ERROR_REM_NOT_LIST Win32Error = 52
	// A duplicate name exists on the network.
	ERROR_DUP_NAME Win32Error = 53
	// The network path was not found.
	ERROR_BAD_NETPATH Win32Error = 54
	// The network is busy.
	ERROR_NETWORK_BUSY Win32Error = 55
	// The specified network resource or device is no longer available.
	ERROR_DEV_NOT_EXIST Win32Error = 56
	// The network BIOS command limit has been reached.
	ERROR_TOO_MANY_CMDS Win32Error = 57
	// A network adapter hardware error occurred.
	ERROR_ADAP_HDW_ERR Win32Error = 58
	// The specified server cannot perform the requested operation.
	ERROR_BAD_NET_RESP Win32Error = 59
	// An unexpected network error occurred.
	ERROR_UNEXP_NET_ERR Win32Error = 60
	// The remote adapter is not compatible.
	ERROR_BAD_REM_ADAP Win32Error = 61
	// The printer queue is full.
	ERROR_PRINTQ_FULL Win32Error = 62
	// Space to store the file waiting to be printed is not available on the server.
	ERROR_NO_SPOOL_SPACE Win32Error = 63
	// Your file waiting to be printed was deleted.
	ERROR_PRINT_CANCELED Win32Error = 64
	// The specified network name is no longer available.
	ERROR_NETNAME_DELETED Win32Error = 65
	// Network access is denied.
	ERROR_NETWORK_ACCESS_DENIED Win32Error = 66
	// The network resource type is not correct.
	ERROR_BAD_DEV_TYPE Win32Error = 67
	// The network name cannot be found.
	ERROR_BAD_NET_NAME Win32Error = 68
	// The name limit for the local computer network adapter card was exceeded.
	ERROR_TOO_MANY_NAMES Win32Error = 69
	// The network BIOS session limit was exceeded.
	ERROR_TOO_MANY_SESS Win32Error = 70
	// The remote server has been paused or is in the process of being started.
	ERROR_SHARING_PAUSED Win32Error = 71
	// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
	ERROR_REQ_NOT_ACCEP Win32Error = 72
	// The specified printer or disk device has been paused.
	ERROR_REDIR_PAUSED Win32Error = 80
	// The file exists.
	ERROR_FILE_EXISTS Win32Error = 82
	// The directory or file cannot be created.
	ERROR_CANNOT_MAKE Win32Error = 83
	// Fail on INT 24.
	ERROR_FAIL_I24 Win32Error = 84
	// Storage to process this request is not available.
	ERROR_OUT_OF_STRUCTURES Win32Error = 85
	// The local device name is already in use.
	ERROR_ALREADY_ASSIGNED Win32Error = 86
	// The specified network password is not correct.
	ERROR_INVALID_PASSWORD Win32Error = 87
	// The parameter is incorrect.
	ERROR_INVALID_PARAMETER Win32Error = 88
	// A write fault occurred on the network.
	ERROR_NET_WRITE_FAULT Win32Error = 89
	// The system cannot start another process at this time.
	ERROR_NO_PROC_SLOTS Win32Error = 100
	// Cannot create another system semaphore.
	ERROR_TOO_MANY_SEMAPHORES Win32Error = 101
	// The exclusive semaphore is owned by another process.
	ERROR_EXCL_SEM_ALREADY_OWNED Win32Error = 102
	// The semaphore is set and cannot be closed.
	ERROR_SEM_IS_SET Win32Error = 103
	// The semaphore cannot be set again.
	ERROR_TOO_MANY_SEM_REQUESTS Win32Error = 104
	// Cannot request exclusive semaphores at interrupt time.
	ERROR_INVALID_AT_INTERRUPT_TIME Win32Error = 105
	// The previous ownership of this semaphore has ended.
	ERROR_SEM_OWNER_DIED Win32Error = 106
	// Insert the diskette for drive %1.
	ERROR_SEM_USER_LIMIT Win32Error = 107
	// The program stopped because an alternate diskette was not inserted.
	ERROR_DISK_CHANGE Win32Error = 108
	// The disk is in use or locked by another process.
	ERROR_DRIVE_LOCKED Win32Error = 109
	// The pipe has been ended.
	ERROR_BROKEN_PIPE Win32Error = 110
	// The system cannot open the device or file specified.
	ERROR_OPEN_FAILED Win32Error = 111
	// The file name is too long.
	ERROR_BUFFER_OVERFLOW Win32Error = 112
	// There is not enough space on the disk.
	ERROR_DISK_FULL Win32Error = 113
	// No more internal file identifiers available.
	ERROR_NO_MORE_SEARCH_HANDLES Win32Error = 114
	// The target internal file identifier is incorrect.
	ERROR_INVALID_TARGET_HANDLE Win32Error = 117
	// The IOCTL call made by the application program is not correct.
	ERROR_INVALID_CATEGORY Win32Error = 118
	// The verify-on-write switch parameter value is not correct.
	ERROR_INVALID_VERIFY_SWITCH Win32Error = 119
	// The system does not support the command requested.
	ERROR_BAD_DRIVER_LEVEL Win32Error = 120
	// This function is not supported on this system.
	ERROR_CALL_NOT_IMPLEMENTED Win32Error = 121
	// The semaphore timeout period has expired.
	ERROR_SEM_TIMEOUT Win32Error = 122
	// The data area passed to a system call is too small.
	ERROR_INSUFFICIENT_BUFFER Win32Error = 123
	// The filename, directory name, or volume label syntax is incorrect.
	ERROR_INVALID_NAME Win32Error = 124
	// The system call level is not correct.
	ERROR_INVALID_LEVEL Win32Error = 125
	// The disk has no volume label.
	ERROR_NO_VOLUME_LABEL Win32Error = 126
	// The specified module could not be found.
	ERROR_MOD_NOT_FOUND Win32Error = 127
	// The specified procedure could not be found.
	ERROR_PROC_NOT_FOUND Win32Error = 128
	// There are no child processes to wait for.
	ERROR_WAIT_NO_CHILDREN Win32Error = 129
	// The %1 application cannot be run in Win32 mode.
	ERROR_CHILD_NOT_COMPLETE Win32Error = 130
	// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
	ERROR_DIRECT_ACCESS_HANDLE Win32Error = 131
	// An attempt was made to move the file pointer before the beginning of the file.
	ERROR_NEGATIVE_SEEK Win32Error = 132
	// The file pointer cannot be set on the specified device or file.
	ERROR_SEEK_ON_DEVICE Win32Error = 133
	// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
	ERROR_IS_JOIN_TARGET Win32Error = 134
	// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
	ERROR_IS_JOINED Win32Error = 135
	// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
	ERROR_IS_SUBSTED Win32Error = 136
	// The system tried to delete the JOIN of a drive that is not joined.
	ERROR_NOT_JOINED Win32Error = 137
	// The system tried to delete the substitution of a drive that is not substituted.
	ERROR_NOT_SUBSTED Win32Error = 138
	// The system tried to join a drive to a directory on a joined drive.
	ERROR_JOIN_TO_JOIN Win32Error = 139
	// The system tried to substitute a drive to a directory on a substituted drive.
	ERROR_SUBST_TO_SUBST Win32Error = 140
	// The system tried to join a drive to a directory on a substituted drive.
	ERROR_JOIN_TO_SUBST Win32Error = 141
	// The system tried to SUBST a drive to a directory on a joined drive.
	ERROR_SUBST_TO_JOIN Win32Error = 142
	// The system cannot perform a JOIN or SUBST at this time.
	ERROR_BUSY_DRIVE Win32Error = 143
	// The system cannot join or substitute a drive to or for a directory on the same drive.
	ERROR_SAME_DRIVE Win32Error = 144
	// The directory is not a subdirectory of the root directory.
	ERROR_DIR_NOT_ROOT Win32Error = 145
	// The directory is not empty.
	ERROR_DIR_NOT_EMPTY Win32Error = 146
	// The path specified is being used in a substitute.
	ERROR_IS_SUBST_PATH Win32Error = 147
	// Not enough resources are available to process this command.
	ERROR_IS_JOIN_PATH Win32Error = 148
	// The path specified cannot be used at this time.
	ERROR_PATH_BUSY Win32Error = 149
	// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
	ERROR_IS_SUBST_TARGET Win32Error = 150
	// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
	ERROR_SYSTEM_TRACE Win32Error = 151
	// The number of specified semaphore events for DosMuxSemWait is not correct.
	ERROR_INVALID_EVENT_COUNT Win32Error = 152
	// DosMuxSemWait did not execute; too many semaphores are already set.
	ERROR_TOO_MANY_MUXWAITERS Win32Error = 153
	// The DosMuxSemWait list is not correct.
	ERROR_INVALID_LIST_FORMAT Win32Error = 154
	// The volume label you entered exceeds the label character limit of the target file system.
	ERROR_LABEL_TOO_LONG Win32Error = 155
	// Cannot create another thread.
	ERROR_TOO_MANY_TCBS Win32Error = 156
	// The recipient process has refused the signal.
	ERROR_SIGNAL_REFUSED Win32Error = 157
	// The segment is already discarded and cannot be locked.
	ERROR_DISCARDED Win32Error = 158
	// The segment is already unlocked.
	ERROR_NOT_LOCKED Win32Error = 159
	// The address for the thread ID is not correct.
	ERROR_BAD_THREADID_ADDR Win32Error = 160
	// The argument string passed to DosExecPgm is not correct.
	ERROR_BAD_ARGUMENTS Win32Error = 161
	// The specified path is invalid.
	ERROR_BAD_PATHNAME Win32Error = 162
	// A signal is already pending.
	ERROR_SIGNAL_PENDING Win32Error = 164
	// No more threads can be created in the system.
	ERROR_MAX_THRDS_REACHED Win32Error = 167
	// Unable to lock a region of a file.
	ERROR_LOCK_FAILED Win32Error = 170
	// The requested resource is in use.
	ERROR_BUSY Win32Error = 173
	// A lock request was not outstanding for the supplied cancel region.
	ERROR_CANCEL_VIOLATION Win32Error = 174
	// The file system does not support atomic changes to the lock type.
	ERROR_ATOMIC_LOCKS_NOT_SUPPORTED Win32Error = 180
	// The system detected a segment number that was not correct.
	ERROR_INVALID_SEGMENT_NUMBER Win32Error = 182
	// The operating system cannot run %1.
	ERROR_INVALID_ORDINAL Win32Error = 183
	// Cannot create a file when that file already exists.
	ERROR_ALREADY_EXISTS Win32Error = 186
	// The flag passed is not correct.
	ERROR_INVALID_FLAG_NUMBER Win32Error = 187
	// The specified system semaphore name was not found.
	ERROR_SEM_NOT_FOUND Win32Error = 188
	// The operating system cannot run %1.
	ERROR_INVALID_STARTING_CODESEG Win32Error = 189
	// The operating system cannot run %1.
	ERROR_INVALID_STACKSEG Win32Error = 190
	// The operating system cannot run %1.
	ERROR_INVALID_MODULETYPE Win32Error = 191
	// Cannot run %1 in Win32 mode.
	ERROR_INVALID_EXE_SIGNATURE Win32Error = 192
	// The operating system cannot run %1.
	ERROR_EXE_MARKED_INVALID Win32Error = 193
	// %1 is not a valid Win32 application.
	ERROR_BAD_EXE_FORMAT Win32Error = 194
	// The operating system cannot run %1.
	ERROR_ITERATED_DATA_EXCEEDS_64k Win32Error = 195
	// The operating system cannot run %1.
	ERROR_INVALID_MINALLOCSIZE Win32Error = 196
	// The operating system cannot run this application program.
	ERROR_DYNLINK_FROM_INVALID_RING Win32Error = 197
	// The operating system is not presently configured to run this application.
	ERROR_IOPL_NOT_ENABLED Win32Error = 198
	// The operating system cannot run %1.
	ERROR_INVALID_SEGDPL Win32Error = 199
	// The operating system cannot run this application program.
	ERROR_AUTODATASEG_EXCEEDS_64k Win32Error = 200
	// The code segment cannot be greater than or equal to 64K.
	ERROR_RING2SEG_MUST_BE_MOVABLE Win32Error = 201
	// The operating system cannot run %1.
	ERROR_RELOC_CHAIN_XEEDS_SEGLIM Win32Error = 202
	// The operating system cannot run %1.
	ERROR_INFLOOP_IN_RELOC_CHAIN Win32Error = 203
	// The system could not find the environment option that was entered.
	ERROR_ENVVAR_NOT_FOUND Win32Error = 205
	// No process in the command subtree has a signal handler.
	ERROR_NO_SIGNAL_SENT Win32Error = 206
	// The filename or extension is too long.
	ERROR_FILENAME_EXCED_RANGE Win32Error = 207
	// The ring 2 stack is in use.
	ERROR_RING2_STACK_IN_USE Win32Error = 208
	// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
	ERROR_META_EXPANSION_TOO_LONG Win32Error = 209
	// The signal being posted is not correct.
	ERROR_INVALID_SIGNAL_NUMBER Win32Error = 210
	// The signal handler cannot be set.
	ERROR_THREAD_1_INACTIVE Win32Error = 212
	// The segment is locked and cannot be reallocated.
	ERROR_LOCKED Win32Error = 214
	// Too many dynamic-link modules are attached to this program or dynamic-link module.
	ERROR_TOO_MANY_MODULES Win32Error = 215
	// Cannot nest calls to LoadModule.
	ERROR_NESTING_NOT_ALLOWED Win32Error = 216
	// The image file %1 is valid, but is for a machine type other than the current machine.
	ERROR_EXE_MACHINE_TYPE_MISMATCH Win32Error = 230
	// The pipe state is invalid.
	ERROR_BAD_PIPE Win32Error = 231
	// All pipe instances are busy.
	ERROR_PIPE_BUSY Win32Error = 232
	// The pipe is being closed.
	ERROR_NO_DATA Win32Error = 233
	// No process is on the other end of the pipe.
	ERROR_PIPE_NOT_CONNECTED Win32Error = 234
	// More data is available.
	ERROR_MORE_DATA Win32Error = 240
	// The session was canceled.
	ERROR_VC_DISCONNECTED Win32Error = 254
	// The specified extended attribute name was invalid.
	ERROR_INVALID_EA_NAME Win32Error = 255
	// The extended attributes are inconsistent.
	ERROR_EA_LIST_INCONSISTENT Win32Error = 258
	// The wait operation timed out.
	// WAIT_TIMEOUT
	// 259
	// No more data is available.
	ERROR_NO_MORE_ITEMS Win32Error = 266
	// The copy functions cannot be used.
	ERROR_CANNOT_COPY Win32Error = 267
	// The directory name is invalid.
	ERROR_DIRECTORY Win32Error = 275
	// The extended attributes did not fit in the buffer.
	ERROR_EAS_DIDNT_FIT Win32Error = 276
	// The extended attribute file on the mounted file system is corrupt.
	ERROR_EA_FILE_CORRUPT Win32Error = 277
	// The extended attribute table file is full.
	ERROR_EA_TABLE_FULL Win32Error = 278
	// The specified extended attribute handle is invalid.
	ERROR_INVALID_EA_HANDLE Win32Error = 282
	// The mounted file system does not support extended attributes.
	ERROR_EAS_NOT_SUPPORTED Win32Error = 288
	// Attempt to release mutex not owned by caller.
	ERROR_NOT_OWNER Win32Error = 298
	// Too many posts were made to a semaphore.
	ERROR_TOO_MANY_POSTS Win32Error = 299
	// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
	ERROR_PARTIAL_COPY Win32Error = 300
	// The oplock request is denied.
	ERROR_OPLOCK_NOT_GRANTED Win32Error = 301
	// An invalid oplock acknowledgment was received by the system.
	ERROR_INVALID_OPLOCK_PROTOCOL Win32Error = 317
	// The system cannot find message text for message number 0x%1 in the message file for %2.
	ERROR_MR_MID_NOT_FOUND Win32Error = 487
	// Attempt to access invalid address.
	ERROR_INVALID_ADDRESS Win32Error = 534
	// Arithmetic result exceeded 32 bits.
	ERROR_ARITHMETIC_OVERFLOW Win32Error = 535
	// There is a process on other end of the pipe.
	ERROR_PIPE_CONNECTED Win32Error = 536
	// Waiting for a process to open the other end of the pipe.
	ERROR_PIPE_LISTENING Win32Error = 994
	// Access to the extended attribute was denied.
	ERROR_EA_ACCESS_DENIED Win32Error = 995
	// The I/O operation has been aborted because of either a thread exit or an application request.
	ERROR_OPERATION_ABORTED Win32Error = 996
	// Overlapped I/O event is not in a signaled state.
	ERROR_IO_INCOMPLETE Win32Error = 997
	// Overlapped I/O operation is in progress.
	ERROR_IO_PENDING Win32Error = 998
	// Invalid access to memory location.
	ERROR_NOACCESS Win32Error = 999
)

func DestroyWindow

func DestroyWindow(hwnd HWnd) Win32Error

func GetClientRect

func GetClientRect(hwnd HWnd, pRect *Rect) Win32Error

func GetMessageW

func GetMessageW(pMsg *MSG, hwnd HWnd, msgFilterMin, msgFilterMax uint32) (int32, Win32Error)

func PeekMessageW

func PeekMessageW(pMsg *MSG, hwnd HWnd, msgFilterMin, msgFilterMax, removeMessage uint32) (int32, Win32Error)

func RegisterClassExW

func RegisterClassExW(wc *WNDCLASSEXW) (uint16, Win32Error)

func ValidateRect

func ValidateRect(hwnd HWnd, pRect *Rect) Win32Error

func (*Win32Error) Error

func (err *Win32Error) Error() string

func (Win32Error) String

func (i Win32Error) String() string

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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