win

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

README

win包中的winapi以UNICODE为准。

内部转换函数

CStr 即UTF8转Unicode

GoStr 即Unicode转UTF8

CBool 即Go Bool转 C Bool

GoBool 即 C Bool 转 Go Bool

UTF8ToANSI utf8转ansi

Documentation

Index

Constants

View Source
const (
	LVM_FIRST = 0x1000 /* ListView messages */
	TV_FIRST  = 0x1100 /* TreeView messages */

)
View Source
const (
	// ListView
	LVM_SUBITEMHITTEST  = LVM_FIRST + 57
	LVM_GETITEMRECT     = LVM_FIRST + 14
	LVM_GETCOLUMNWIDTH  = LVM_FIRST + 29
	LVM_GETITEMPOSITION = LVM_FIRST + 16
	LVM_GETSUBITEMRECT  = LVM_FIRST + 56

	LVIR_BOUNDS       = 0
	LVIR_ICON         = 1
	LVIR_LABEL        = 2
	LVIR_SELECTBOUNDS = 3
)

ListView

View Source
const (
	TVM_GETITEMW = TV_FIRST + 62
	TVM_GETITEM  = TVM_GETITEMW

	TVM_SETITEMW = TV_FIRST + 63
	TVM_SETITEM  = TVM_SETITEMW

	TVS_HASBUTTONS      = 0x0001
	TVS_HASLINES        = 0x0002
	TVS_LINESATROOT     = 0x0004
	TVS_EDITLABELS      = 0x0008
	TVS_DISABLEDRAGDROP = 0x0010
	TVS_SHOWSELALWAYS   = 0x0020
	TVS_RTLREADING      = 0x0040
	TVS_NOTOOLTIPS      = 0x0080
	TVS_CHECKBOXES      = 0x0100
	TVS_TRACKSELECT     = 0x0200
	TVS_SINGLEEXPAND    = 0x0400
	TVS_INFOTIP         = 0x0800
	TVS_FULLROWSELECT   = 0x1000
	TVS_NOSCROLL        = 0x2000
	TVS_NONEVENHEIGHT   = 0x4000
	/* For IE >= 0x0500 */
	TVS_NOHSCROLL = 0x8000 // TVS_NOSCROLL overrides this

	/* For Windows >= Vista */
	TVS_EX_MULTISELECT         = 0x0002
	TVS_EX_DOUBLEBUFFER        = 0x0004
	TVS_EX_NOINDENTSTATE       = 0x0008
	TVS_EX_RICHTOOLTIP         = 0x0010
	TVS_EX_AUTOHSCROLL         = 0x0020
	TVS_EX_FADEINOUTEXPANDOS   = 0x0040
	TVS_EX_PARTIALCHECKBOXES   = 0x0080
	TVS_EX_EXCLUSIONCHECKBOXES = 0x0100
	TVS_EX_DIMMEDCHECKBOXES    = 0x0200
	TVS_EX_DRAWIMAGEASYNC      = 0x0400

	TVIF_TEXT          = 0x0001
	TVIF_IMAGE         = 0x0002
	TVIF_PARAM         = 0x0004
	TVIF_STATE         = 0x0008
	TVIF_HANDLE        = 0x0010
	TVIF_SELECTEDIMAGE = 0x0020
	TVIF_CHILDREN      = 0x0040
	TVIF_INTEGRAL      = 0x0080
	/* For Windows >= Vista */
	TVIF_STATEEX       = 0x0100
	TVIF_EXPANDEDIMAGE = 0x0200

	TVIS_FOCUSED       = 0x0001
	TVIS_SELECTED      = 0x0002
	TVIS_CUT           = 0x0004
	TVIS_DROPHILITED   = 0x0008
	TVIS_BOLD          = 0x0010
	TVIS_EXPANDED      = 0x0020
	TVIS_EXPANDEDONCE  = 0x0040
	TVIS_EXPANDPARTIAL = 0x0080

	TVIS_OVERLAYMASK    = 0x0F00
	TVIS_STATEIMAGEMASK = 0xF000
	TVIS_USERMASK       = 0xF000

	/* For IE >= 0x0600 */
	TVIS_EX_FLAT = 0x0001
	TVIS_EX_ALL  = 0x0002
	/* For Windows >= Vista */
	TVIS_EX_DISABLED = 0x0002

	TVIS_CHECKED = 0x2000
)

TreeView

View Source
const (
	MB_OK               = 0x00000000
	MB_OKCANCEL         = 0x00000001
	MB_ABORTRETRYIGNORE = 0x00000002
	MB_YESNOCANCEL      = 0x00000003
	MB_YESNO            = 0x00000004
	MB_RETRYCANCEL      = 0x00000005

	MB_ICONHAND        = 0x00000010
	MB_ICONQUESTION    = 0x00000020
	MB_ICONEXCLAMATION = 0x00000030
	MB_ICONASTERISK    = 0x00000040
	MB_USERICON        = 0x00000080
	MB_ICONWARNING     = MB_ICONEXCLAMATION
	MB_ICONERROR       = MB_ICONHAND
	MB_ICONINFORMATION = MB_ICONASTERISK
	MB_ICONSTOP        = MB_ICONHAND
	MB_DEFBUTTON1      = 0x00000000
	MB_DEFBUTTON2      = 0x00000100
	MB_DEFBUTTON3      = 0x00000200
	MB_DEFBUTTON4      = 0x00000300
	MB_APPLMODAL       = 0x00000000
	MB_SYSTEMMODAL     = 0x00001000
	MB_TASKMODAL       = 0x00002000
	MB_HELP            = 0x00004000 // Help Button

	MB_NOFOCUS              = 0x00008000
	MB_SETFOREGROUND        = 0x00010000
	MB_DEFAULT_DESKTOP_ONLY = 0x00020000

	MB_TOPMOST    = 0x00040000
	MB_RIGHT      = 0x00080000
	MB_RTLREADING = 0x00100000

	MB_SERVICE_NOTIFICATION      = 0x00200000
	MB_SERVICE_NOTIFICATION_NT3X = 0x00040000

	MB_TYPEMASK = 0x0000000F
	MB_ICONMASK = 0x000000F0
	MB_DEFMASK  = 0x00000F00
	MB_MODEMASK = 0x00003000
	MB_MISCMASK = 0x0000C000
)

MessageBox() Flags

View Source
const (
	HKEY_CLASSES_ROOT     = 0x80000000
	HKEY_CURRENT_USER     = 0x80000001
	HKEY_LOCAL_MACHINE    = 0x80000002
	HKEY_USERS            = 0x80000003
	HKEY_PERFORMANCE_DATA = 0x80000004
	HKEY_CURRENT_CONFIG   = 0x80000005
	HKEY_DYN_DATA         = 0x80000006
)
View Source
const (
	DELETE                  = 0x00010000 // Renamed from DELETE
	READ_CONTROL            = 0x00020000
	WRITE_DAC               = 0x00040000
	WRITE_OWNER             = 0x00080000
	STANDARD_RIGHTS_READ    = READ_CONTROL
	STANDARD_RIGHTS_WRITE   = READ_CONTROL
	STANDARD_RIGHTS_EXECUTE = READ_CONTROL
	STANDARD_RIGHTS_ALL     = 0x001F0000
	SPECIFIC_RIGHTS_ALL     = 0x0000FFFF
	ACCESS_SYSTEM_SECURITY  = 0x01000000
	MAXIMUM_ALLOWED         = 0x02000000
	GENERIC_READ            = 0x80000000
	GENERIC_WRITE           = 0x40000000
	GENERIC_EXECUTE         = 0x20000000
	GENERIC_ALL             = 0x10000000

	KEY_QUERY_VALUE        = 0x0001
	KEY_SET_VALUE          = 0x0002
	KEY_CREATE_SUB_KEY     = 0x0004
	KEY_ENUMERATE_SUB_KEYS = 0x0008
	KEY_NOTIFY             = 0x0010
	KEY_CREATE_LINK        = 0x0020
	KEY_WOW64_32KEY        = 0x0200
	KEY_WOW64_64KEY        = 0x0100
	KEY_WOW64_RES          = 0x0300

	// (STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & ^SYNCHRONIZE
	KEY_READ = 0x00020019
	// (STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & ^SYNCHRONIZE
	KEY_WRITE = 0x00020006
	//  KEY_READ & ^SYNCHRONIZE
	KEY_EXECUTE = 0x00020019

	// (STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE |
	//		KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS |
	//		KEY_NOTIFY | KEY_CREATE_LINK) & ^SYNCHRONIZE
	KEY_ALL_ACCESS = 0x000F003F
)
View Source
const (
	GWL_WNDPROC    = -4
	GWL_HINSTANCE  = -6
	GWL_HWNDPARENT = -8
	GWL_STYLE      = -16
	GWL_EXSTYLE    = -20
	GWL_USERDATA   = -21
	GWL_ID         = -12
)

SetWindowLongPtr GetWindowLongPtr

View Source
const (
	// System Menu Command Values
	SC_SIZE         = 61440
	SC_MOVE         = 61456
	SC_MINIMIZE     = 61472
	SC_MAXIMIZE     = 61488
	SC_NEXTWINDOW   = 61504
	SC_PREVWINDOW   = 61520
	SC_CLOSE        = 61536
	SC_VSCROLL      = 61552
	SC_HSCROLL      = 61568
	SC_MOUSEMENU    = 61584
	SC_KEYMENU      = 61696
	SC_ARRANGE      = 61712
	SC_RESTORE      = 61728
	SC_TASKLIST     = 61744
	SC_SCREENSAVE   = 61760
	SC_HOTKEY       = 61776
	SC_DEFAULT      = 61792
	SC_MONITORPOWER = 61808
	SC_CONTEXTHELP  = 61824
	SC_SEPARATOR    = 61455

	SCF_ISSECURE = 0x00000001

	// Obsolete names
	SC_ICON = SC_MINIMIZE
	SC_ZOOM = SC_MAXIMIZE
)
View Source
const (
	// Scroll Bar Constants
	SB_HORZ = 0
	SB_VERT = 1
	SB_CTL  = 2
	SB_BOTH = 3

	// Scroll Bar Commands
	SB_LINEUP        = 0
	SB_LINELEFT      = 0
	SB_LINEDOWN      = 1
	SB_LINERIGHT     = 1
	SB_PAGEUP        = 2
	SB_PAGELEFT      = 2
	SB_PAGEDOWN      = 3
	SB_PAGERIGHT     = 3
	SB_THUMBPOSITION = 4
	SB_THUMBTRACK    = 5
	SB_TOP           = 6
	SB_LEFT          = 6
	SB_BOTTOM        = 7
	SB_RIGHT         = 7
	SB_ENDSCROLL     = 8

	// ShowWindow() Commands
	SW_HIDE            = 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_FORCEMINIMIZE   = 11
	SW_MAX             = 11

	// Old ShowWindow() Commands
	HIDE_WINDOW         = 0
	SHOW_OPENWINDOW     = 1
	SHOW_ICONWINDOW     = 2
	SHOW_FULLSCREEN     = 3
	SHOW_OPENNOACTIVATE = 4

	// Identifiers for the WM_SHOWWINDOW message
	SW_PARENTCLOSING = 1
	SW_OTHERZOOM     = 2
	SW_PARENTOPENING = 3
	SW_OTHERUNZOOM   = 4
)
View Source
const (
	// Code Page Default Values.
	CP_ACP        = 0     // default to ANSI code page
	CP_OEMCP      = 1     // default to OEM  code page
	CP_MACCP      = 2     // default to MAC  code page
	CP_THREAD_ACP = 3     // current thread's ANSI code page
	CP_SYMBOL     = 42    // SYMBOL translations
	CP_UTF7       = 65000 // UTF-7 translation
	CP_UTF8       = 65001 // UTF-8 translation
)
View Source
const (
	// Window Styles
	WS_OVERLAPPED   = 0
	WS_POPUP        = 0x80000000
	WS_CHILD        = 0x40000000
	WS_MINIMIZE     = 0x20000000
	WS_VISIBLE      = 0x10000000
	WS_DISABLED     = 0x8000000
	WS_CLIPSIBLINGS = 0x4000000
	WS_CLIPCHILDREN = 0x2000000
	WS_MAXIMIZE     = 0x1000000
	WS_CAPTION      = 0xC00000 // WS_BORDER or WS_DLGFRAME
	WS_BORDER       = 0x800000
	WS_DLGFRAME     = 0x400000
	WS_VSCROLL      = 0x200000
	WS_HSCROLL      = 0x100000
	WS_SYSMENU      = 0x80000
	WS_THICKFRAME   = 0x40000
	WS_GROUP        = 0x20000
	WS_TABSTOP      = 0x10000

	WS_MINIMIZEBOX = 0x20000
	WS_MAXIMIZEBOX = 0x10000

	WS_TILED   = WS_OVERLAPPED
	WS_ICONIC  = WS_MINIMIZE
	WS_SIZEBOX = WS_THICKFRAME

	// Common Window Styles
	WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
	WS_TILEDWINDOW      = WS_OVERLAPPEDWINDOW
	WS_POPUPWINDOW      = WS_POPUP | WS_BORDER | WS_SYSMENU
	WS_CHILDWINDOW      = WS_CHILD

	// Extended Window Styles
	WS_EX_DLGMODALFRAME  = 1
	WS_EX_NOPARENTNOTIFY = 4
	WS_EX_TOPMOST        = 8
	WS_EX_ACCEPTFILES    = 0x10
	WS_EX_TRANSPARENT    = 0x20
	WS_EX_MDICHILD       = 0x40
	WS_EX_TOOLWINDOW     = 0x80
	WS_EX_WINDOWEDGE     = 0x100
	WS_EX_CLIENTEDGE     = 0x200
	WS_EX_CONTEXTHELP    = 0x400

	WS_EX_RIGHT          = 0x1000
	WS_EX_LEFT           = 0
	WS_EX_RTLREADING     = 0x2000
	WS_EX_LTRREADING     = 0
	WS_EX_LEFTSCROLLBAR  = 0x4000
	WS_EX_RIGHTSCROLLBAR = 0

	WS_EX_CONTROLPARENT    = 0x10000
	WS_EX_STATICEDGE       = 0x20000
	WS_EX_APPWINDOW        = 0x40000
	WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE
	WS_EX_PALETTEWINDOW    = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST

	WS_EX_LAYERED = 0x00080000

	WS_EX_NOINHERITLAYOUT = 0x00100000 // Disable inheritence of mirroring by children
	WS_EX_LAYOUTRTL       = 0x00400000 // Right to left mirroring
	WS_EX_COMPOSITED      = 0x02000000
	WS_EX_NOACTIVATE      = 0x08000000
)
View Source
const (
	THREAD_BASE_PRIORITY_LOWRT = 15  // value that gets a thread to LowRealtime-1
	THREAD_BASE_PRIORITY_MAX   = 2   // maximum thread base priority boost
	THREAD_BASE_PRIORITY_MIN   = -2  // minimum thread base priority boost
	THREAD_BASE_PRIORITY_IDLE  = -15 // value that gets a thread to idle

	SYNCHRONIZE              = 0x00100000
	STANDARD_RIGHTS_REQUIRED = 0x000F0000
	EVENT_MODIFY_STATE       = 0x0002
	EVENT_ALL_ACCESS         = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3
	MUTANT_QUERY_STATE       = 0x0001
	MUTANT_ALL_ACCESS        = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | MUTANT_QUERY_STATE

	SEMAPHORE_MODIFY_STATE = 0x0002
	SEMAPHORE_ALL_ACCESS   = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3

	PROCESS_TERMINATE         = 0x0001
	PROCESS_CREATE_THREAD     = 0x0002
	PROCESS_VM_OPERATION      = 0x0008
	PROCESS_VM_READ           = 0x0010
	PROCESS_VM_WRITE          = 0x0020
	PROCESS_DUP_HANDLE        = 0x0040
	PROCESS_CREATE_PROCESS    = 0x0080
	PROCESS_SET_QUOTA         = 0x0100
	PROCESS_SET_INFORMATION   = 0x0200
	PROCESS_QUERY_INFORMATION = 0x0400
	// if NTDDI_VERSION >= NTDDI_VISTA
	PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF

	PROCESSOR_INTEL_386     = 386
	PROCESSOR_INTEL_486     = 486
	PROCESSOR_INTEL_PENTIUM = 586
	PROCESSOR_INTEL_IA64    = 2200
	PROCESSOR_AMD_X8664     = 8664
	PROCESSOR_MIPS_R4000    = 4000 // incl R4101 & R3910 for Windows CE
	PROCESSOR_ALPHA_21064   = 21064
	PROCESSOR_PPC_601       = 601
	PROCESSOR_PPC_603       = 603
	PROCESSOR_PPC_604       = 604
	PROCESSOR_PPC_620       = 620
	PROCESSOR_HITACHI_SH3   = 10003  // Windows CE
	PROCESSOR_HITACHI_SH3E  = 10004  // Windows CE
	PROCESSOR_HITACHI_SH4   = 10005  // Windows CE
	PROCESSOR_MOTOROLA_821  = 821    // Windows CE
	PROCESSOR_SHx_SH3       = 103    // Windows CE
	PROCESSOR_SHx_SH4       = 104    // Windows CE
	PROCESSOR_STRONGARM     = 2577   // Windows CE - 0xA11
	PROCESSOR_ARM720        = 1824   // Windows CE - 0x720
	PROCESSOR_ARM820        = 2080   // Windows CE - 0x820
	PROCESSOR_ARM920        = 2336   // Windows CE - 0x920
	PROCESSOR_ARM_7TDMI     = 70001  // Windows CE
	PROCESSOR_OPTIL         = 0x494F // MSIL

	PROCESSOR_ARCHITECTURE_INTEL         = 0
	PROCESSOR_ARCHITECTURE_MIPS          = 1
	PROCESSOR_ARCHITECTURE_ALPHA         = 2
	PROCESSOR_ARCHITECTURE_PPC           = 3
	PROCESSOR_ARCHITECTURE_SHX           = 4
	PROCESSOR_ARCHITECTURE_ARM           = 5
	PROCESSOR_ARCHITECTURE_IA64          = 6
	PROCESSOR_ARCHITECTURE_ALPHA64       = 7
	PROCESSOR_ARCHITECTURE_MSIL          = 8
	PROCESSOR_ARCHITECTURE_AMD64         = 9
	PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10

	PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF
)
View Source
const (
	TOKEN_ASSIGN_PRIMARY    = 0x0001
	TOKEN_DUPLICATE         = 0x0002
	TOKEN_IMPERSONATE       = 0x0004
	TOKEN_QUERY             = 0x0008
	TOKEN_QUERY_SOURCE      = 0x0010
	TOKEN_ADJUST_PRIVILEGES = 0x0020
	TOKEN_ADJUST_GROUPS     = 0x0040
	TOKEN_ADJUST_DEFAULT    = 0x0080
	TOKEN_ADJUST_SESSIONID  = 0x0100

	TOKEN_ALL_ACCESS_P = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY |
		TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY |
		TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS |
		TOKEN_ADJUST_DEFAULT

	// if _WIN32_WINNT > 0x0400 || !defined(_WIN32_WINNT)
	TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID

	TOKEN_READ    = STANDARD_RIGHTS_READ | TOKEN_QUERY
	TOKEN_WRITE   = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT
	TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE
)
View Source
const (
	// constants for the biCompression field
	BI_RGB       = 0
	BI_RLE8      = 1
	BI_RLE4      = 2
	BI_BITFIELDS = 3

	// currentlly defined blend function
	AC_SRC_OVER  = 0x00
	AC_SRC_ALPHA = 0x01

	// alpha format flags
	AC_SRC_NO_PREMULT_ALPHA = 0x01
	AC_SRC_NO_ALPHA         = 0x02
	AC_DST_NO_PREMULT_ALPHA = 0x10
	AC_DST_NO_ALPHA         = 0x20

	LWA_COLORKEY = 0x00000001
	LWA_ALPHA    = 0x00000002
	ULW_COLORKEY = 0x00000001
	ULW_ALPHA    = 0x00000002
	ULW_OPAQUE   = 0x00000004
)
View Source
const (
	//
	//  File System Notification flags
	//
	SHCNRF_InterruptLevel     = 0x00000001
	SHCNRF_ShellLevel         = 0x00000002
	SHCNRF_RecursiveInterrupt = 0x00001000
	SHCNRF_NewDelivery        = 0x00008000

	SHCNE_RENAMEITEM       = 0x00000001
	SHCNE_CREATE           = 0x00000002
	SHCNE_DELETE           = 0x00000004
	SHCNE_MKDIR            = 0x00000008
	SHCNE_RMDIR            = 0x00000010
	SHCNE_MEDIAINSERTED    = 0x00000020
	SHCNE_MEDIAREMOVED     = 0x00000040
	SHCNE_DRIVEREMOVED     = 0x00000080
	SHCNE_DRIVEADD         = 0x00000100
	SHCNE_NETSHARE         = 0x00000200
	SHCNE_NETUNSHARE       = 0x00000400
	SHCNE_ATTRIBUTES       = 0x00000800
	SHCNE_UPDATEDIR        = 0x00001000
	SHCNE_UPDATEITEM       = 0x00002000
	SHCNE_SERVERDISCONNECT = 0x00004000
	SHCNE_UPDATEIMAGE      = 0x00008000
	SHCNE_DRIVEADDGUI      = 0x00010000
	SHCNE_RENAMEFOLDER     = 0x00020000
	SHCNE_FREESPACE        = 0x00040000

	SHCNE_EXTENDED_EVENT         = 0x04000000
	SHCNE_EXTENDED_EVENT_PRE_IE4 = 0x00080000

	SHCNE_ASSOCCHANGED = 0x08000000

	SHCNE_DISKEVENTS   = 0x0002381F
	SHCNE_GLOBALEVENTS = 0x0C0581E0 // Events that dont match pidls first
	SHCNE_ALLEVENTS    = 0x7FFFFFFF
	SHCNE_INTERRUPT    = 0x80000000 // The presence of this flag indicates

	SHCNEE_ORDERCHANGED  = 0x00000002 // pidl2 is the changed folder
	SHCNEE_MSI_CHANGE    = 0x00000004 // pidl2 is a SHChangeProductKeyAsIDList
	SHCNEE_MSI_UNINSTALL = 0x00000005 // pidl2 is a SHChangeProductKeyAsIDList

	// Flags
	// uFlags & SHCNF_TYPE is an ID which indicates what dwItem1 and dwItem2 mean
	SHCNF_IDLIST      = 0x0000 // LPITEMIDLIST
	SHCNF_PATHA       = 0x0001 // path name
	SHCNF_PRINTERA    = 0x0002 // printer friendly name
	SHCNF_DWORD       = 0x0003 // DWORD
	SHCNF_PATHW       = 0x0005 // path name
	SHCNF_PRINTERW    = 0x0006 // printer friendly name
	SHCNF_TYPE        = 0x00FF
	SHCNF_FLUSH       = 0x1000
	SHCNF_FLUSHNOWAIT = 0x3000 // includes SHCNF_FLUSH

	SHCNF_NOTIFYRECURSIVE = 0x10000 // Notify clients registered for any child

)
View Source
const (
	SWP_NOSIZE         = 1
	SWP_NOMOVE         = 2
	SWP_NOZORDER       = 4
	SWP_NOREDRAW       = 8
	SWP_NOACTIVATE     = 0x10
	SWP_FRAMECHANGED   = 0x20 // The frame changed: send WM_NCCALCSIZE
	SWP_SHOWWINDOW     = 0x40
	SWP_HIDEWINDOW     = 0x80
	SWP_NOCOPYBITS     = 0x100
	SWP_NOOWNERZORDER  = 0x200 // Don't do owner Z ordering
	SWP_NOSENDCHANGING = 0x400 // Don't send WM_WINDOWPOSCHANGING
	SWP_DRAWFRAME      = SWP_FRAMECHANGED
	SWP_NOREPOSITION   = SWP_NOOWNERZORDER
	SWP_DEFERERASE     = 0x2000
	SWP_ASYNCWINDOWPOS = 0x4000

	HWND_TOP       = 0
	HWND_BOTTOM    = 1
	HWND_TOPMOST   = ^(-1) // -1
	HWND_NOTOPMOST = ^(-2) // -2
)
View Source
const (
	/* Binary raster ops */
	R2_BLACK       = 1    /*  0   */
	R2_NOTMERGEPEN = 2    /* DPon */
	R2_MASKNOTPEN  = 3    /* DPna */
	R2_NOTCOPYPEN  = 4    /* PN   */
	R2_MASKPENNOT  = 5    /* PDna */
	R2_NOT         = 6    /* Dn   */
	R2_XORPEN      = 7    /* DPx  */
	R2_NOTMASKPEN  = 8    /* DPan */
	R2_MASKPEN     = 9    /* DPa  */
	R2_NOTXORPEN   = 10   /* DPxn */
	R2_NOP         = 11   /* D    */
	R2_MERGENOTPEN = 12   /* DPno */
	R2_COPYPEN     = 13   /* P    */
	R2_MERGEPENNOT = 14   /* PDno */
	R2_MERGEPEN    = 15   /* DPo  */
	R2_WHITE       = 0x10 /*  1   */
	R2_LAST        = 0x10

	/* Ternary raster operations */
	SRCCOPY     = 0x00CC0020 /* dest = source                    */
	SRCPAINT    = 0x00EE0086 /* dest = source OR dest            */
	SRCAND      = 0x008800C6 /* dest = source AND dest           */
	SRCINVERT   = 0x00660046 /* dest = source XOR dest           */
	SRCERASE    = 0x00440328 /* dest = source AND (NOT dest )    */
	NOTSRCCOPY  = 0x00330008 /* dest = (NOT source)              */
	NOTSRCERASE = 0x001100A6 /* dest = (NOT src) AND (NOT dest)  */
	MERGECOPY   = 0x00C000CA /* dest = (source AND pattern)      */
	MERGEPAINT  = 0x00BB0226 /* dest = (NOT source) OR dest      */
	PATCOPY     = 0x00F00021 /* dest = pattern                   */
	PATPAINT    = 0x00FB0A09 /* dest = DPSnoo                    */
	PATINVERT   = 0x005A0049 /* dest = pattern XOR dest          */
	DSTINVERT   = 0x00550009 /* dest = (NOT dest)                */
	BLACKNESS   = 0x00000042 /* dest = BLACK                     */
	WHITENESS   = 0x00FF0062 /* dest = WHITE */

)
View Source
const (
	CSIDL_DESKTOP                 = 0x0000         // <desktop>
	CSIDL_INTERNET                = 0x0001         // Internet Explorer (icon on desktop)
	CSIDL_PROGRAMS                = 0x0002         // Start Menu\Programs
	CSIDL_CONTROLS                = 0x0003         // My Computer\Control Panel
	CSIDL_PRINTERS                = 0x0004         // My Computer\Printers
	CSIDL_PERSONAL                = 0x0005         // My Documents
	CSIDL_FAVORITES               = 0x0006         // <user name>\Favorites
	CSIDL_STARTUP                 = 0x0007         // Start Menu\Programs\Startup
	CSIDL_RECENT                  = 0x0008         // <user name>\Recent
	CSIDL_SENDTO                  = 0x0009         // <user name>\SendTo
	CSIDL_BITBUCKET               = 0x000a         // <desktop>\Recycle Bin
	CSIDL_STARTMENU               = 0x000b         // <user name>\Start Menu
	CSIDL_MYDOCUMENTS             = CSIDL_PERSONAL // Personal was just a silly name for My Documents
	CSIDL_MYMUSIC                 = 0x000d         // "My Music" folder
	CSIDL_MYVIDEO                 = 0x000e         // "My Videos" folder
	CSIDL_DESKTOPDIRECTORY        = 0x0010         // <user name>\Desktop
	CSIDL_DRIVES                  = 0x0011         // My Computer
	CSIDL_NETWORK                 = 0x0012         // Network Neighborhood (My Network Places)
	CSIDL_NETHOOD                 = 0x0013         // <user name>\nethood
	CSIDL_FONTS                   = 0x0014         // windows\fonts
	CSIDL_TEMPLATES               = 0x0015
	CSIDL_COMMON_STARTMENU        = 0x0016 // All Users\Start Menu
	CSIDL_COMMON_PROGRAMS         = 0x0017 // All Users\Start Menu\Programs
	CSIDL_COMMON_STARTUP          = 0x0018 // All Users\Startup
	CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019 // All Users\Desktop
	CSIDL_APPDATA                 = 0x001a // <user name>\Application Data
	CSIDL_PRINTHOOD               = 0x001b // <user name>\PrintHood
	CSIDL_LOCAL_APPDATA           = 0x001c // <user name>\Local Settings\Applicaiton Data (non roaming)
	CSIDL_ALTSTARTUP              = 0x001d // non localized startup
	CSIDL_COMMON_ALTSTARTUP       = 0x001e // non localized common startup
	CSIDL_COMMON_FAVORITES        = 0x001f
	CSIDL_INTERNET_CACHE          = 0x0020
	CSIDL_COOKIES                 = 0x0021
	CSIDL_HISTORY                 = 0x0022
	CSIDL_COMMON_APPDATA          = 0x0023 // All Users\Application Data
	CSIDL_WINDOWS                 = 0x0024 // GetWindowsDirectory()
	CSIDL_SYSTEM                  = 0x0025 // GetSystemDirectory()
	CSIDL_PROGRAM_FILES           = 0x0026 // C:\Program Files
	CSIDL_MYPICTURES              = 0x0027 // C:\Program Files\My Pictures
	CSIDL_PROFILE                 = 0x0028 // USERPROFILE
	CSIDL_SYSTEMX86               = 0x0029 // x86 system directory on RISC
	CSIDL_PROGRAM_FILESX86        = 0x002a // x86 C:\Program Files on RISC
	CSIDL_PROGRAM_FILES_COMMON    = 0x002b // C:\Program Files\Common
	CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c // x86 Program Files\Common on RISC
	CSIDL_COMMON_TEMPLATES        = 0x002d // All Users\Templates
	CSIDL_COMMON_DOCUMENTS        = 0x002e // All Users\Documents
	CSIDL_COMMON_ADMINTOOLS       = 0x002f // All Users\Start Menu\Programs\Administrative Tools
	CSIDL_ADMINTOOLS              = 0x0030 // <user name>\Start Menu\Programs\Administrative Tools
	CSIDL_CONNECTIONS             = 0x0031 // Network and Dial-up Connections
	CSIDL_COMMON_MUSIC            = 0x0035 // All Users\My Music
	CSIDL_COMMON_PICTURES         = 0x0036 // All Users\My Pictures
	CSIDL_COMMON_VIDEO            = 0x0037 // All Users\My Video
	CSIDL_RESOURCES               = 0x0038 // Resource Direcotry
	CSIDL_RESOURCES_LOCALIZED     = 0x0039 // Localized Resource Direcotry
	CSIDL_COMMON_OEM_LINKS        = 0x003a // Links to All Users OEM specific apps
	CSIDL_CDBURN_AREA             = 0x003b // USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
	// unused                               0x003c
	CSIDL_COMPUTERSNEARME    = 0x003d // Computers Near Me (computered from Workgroup membership)
	CSIDL_FLAG_CREATE        = 0x8000 // combine with CSIDL_ value to force folder creation in SHGetFolderPath()
	CSIDL_FLAG_DONT_VERIFY   = 0x4000 // combine with CSIDL_ value to return an unverified folder path
	CSIDL_FLAG_DONT_UNEXPAND = 0x2000 // combine with CSIDL_ value to avoid unexpanding environment variables
	CSIDL_FLAG_NO_ALIAS      = 0x1000 // combine with CSIDL_ value to insure non-alias versions of the pidl
	CSIDL_FLAG_PER_USER_INIT = 0x0800 // combine with CSIDL_ value to indicate per-user init (eg. upgrade)
	CSIDL_FLAG_MASK          = 0xFF00 // mask for all possible flag values
)
View Source
const (
	// flags passed as the coInit parameter to CoInitializeEx.
	COINIT_MULTITHREADED     = 0 // OLE calls objects on any thread.
	COINIT_APARTMENTTHREADED = 2 // Apartment model
	COINIT_DISABLE_OLE1DDE   = 4 // Dont use DDE for Ole1 support.
	COINIT_SPEED_OVER_MEMORY = 8 // Trade memory for speed
)
View Source
const (

	/* Predefined Resource Types */
	RT_CURSOR       = 1
	RT_BITMAP       = 2
	RT_ICON         = 3
	RT_MENU         = 4
	RT_DIALOG       = 5
	RT_STRING       = 6
	RT_FONTDIR      = 7
	RT_FONT         = 8
	RT_ACCELERATOR  = 9
	RT_RCDATA       = 10
	RT_MESSAGETABLE = 11

	DIFFERENCE = 11

	RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE
	RT_GROUP_ICON   = RT_ICON + DIFFERENCE
	RT_VERSION      = 16
	RT_DLGINCLUDE   = 17
	RT_PLUGPLAY     = 19
	RT_VXD          = 20
	RT_ANICURSOR    = 21
	RT_ANIICON      = 22
	RT_HTML         = 23
	RT_MANIFEST     = 24
)
View Source
const (
	HDM_FIRST = 0x1200 /* Header messages */
	TCM_FIRST = 0x1300 /* Tab control messages */
	PGM_FIRST = 0x1400 /* Pager control messages */
	/* For Windows >= XP */
	ECM_FIRST = 0x1500 /* Edit control messages */
	BCM_FIRST = 0x1600 /* Button control messages */
	CBM_FIRST = 0x1700 /* Combobox control messages */

	CCM_FIRST = 0x2000 /* Common control shared messages */
	CCM_LAST  = CCM_FIRST + 0x200

	CCM_SETBKCOLOR = CCM_FIRST + 1 // lParam is bkColo
)
View Source
const (
	/* Background Modes */
	TRANSPARENT = 1
	OPAQUE      = 2
	BKMODE_LAST = 2

	/* Graphics Modes */
	GM_COMPATIBLE = 1
	GM_ADVANCED   = 2
	GM_LAST       = 2
)
View Source
const (
	MOD_ALT      = 1
	MOD_CONTROL  = 2
	MOD_SHIFT    = 4
	MOD_WIN      = 8
	MOD_NOREPEAT = 0x4000
)
View Source
const (
	/* regular WinExec() codes */
	SE_ERR_FNF          = 2 /* file not found */
	SE_ERR_PNF          = 3 /* path not found */
	SE_ERR_ACCESSDENIED = 5 /* access denied */
	SE_ERR_OOM          = 8 /* out of memory */
	SE_ERR_DLLNOTFOUND  = 32

	/* error values for ShellExecute() beyond the regular WinExec() codes */
	SE_ERR_SHARE           = 26
	SE_ERR_ASSOCINCOMPLETE = 27
	SE_ERR_DDETIMEOUT      = 28
	SE_ERR_DDEFAIL         = 29
	SE_ERR_DDEBUSY         = 30
	SE_ERR_NOASSOC         = 31

	/* Note CLASSKEY overrides CLASSNAME */
	SEE_MASK_DEFAULT   = 0x00000000
	SEE_MASK_CLASSNAME = 0x00000001
	SEE_MASK_CLASSKEY  = 0x00000003
	/* Note INVOKEIDLIST overrides IDLIST */
	SEE_MASK_IDLIST            = 0x00000004
	SEE_MASK_INVOKEIDLIST      = 0x0000000c
	SEE_MASK_ICON              = 0x00000010
	SEE_MASK_HOTKEY            = 0x00000020
	SEE_MASK_NOCLOSEPROCESS    = 0x00000040
	SEE_MASK_CONNECTNETDRV     = 0x00000080
	SEE_MASK_NOASYNC           = 0x00000100
	SEE_MASK_FLAG_DDEWAIT      = SEE_MASK_NOASYNC
	SEE_MASK_DOENVSUBST        = 0x00000200
	SEE_MASK_FLAG_NO_UI        = 0x00000400
	SEE_MASK_UNICODE           = 0x00004000
	SEE_MASK_NO_CONSOLE        = 0x00008000
	SEE_MASK_ASYNCOK           = 0x00100000
	SEE_MASK_HMONITOR          = 0x00200000 // SHELLEXECUTEINFO.hMonitor
	SEE_MASK_NOZONECHECKS      = 0x00800000
	SEE_MASK_NOQUERYCLASSSTORE = 0x01000000
	SEE_MASK_WAITFORINPUTIDLE  = 0x02000000
	SEE_MASK_FLAG_LOG_USAGE    = 0x04000000
)

Begin ShellExecuteEx and family

ShellExecute() and ShellExecuteEx() error codes
View Source
const (
	PAGE_NOACCESS          = 1
	PAGE_READONLY          = 2
	PAGE_READWRITE         = 4
	PAGE_WRITECOPY         = 8
	PAGE_EXECUTE           = 0x10
	PAGE_EXECUTE_READ      = 0x20
	PAGE_EXECUTE_READWRITE = 0x40
	PAGE_EXECUTE_WRITECOPY = 0x80
	PAGE_GUARD             = 0x100
	PAGE_NOCACHE           = 0x200
	MEM_COMMIT             = 0x1000
	MEM_RESERVE            = 0x2000
	MEM_DECOMMIT           = 0x4000
	MEM_RELEASE            = 0x8000
	MEM_FREE               = 0x10000
	MEM_PRIVATE            = 0x20000
	MEM_MAPPED             = 0x40000
	MEM_RESET              = 0x80000
	MEM_TOP_DOWN           = 0x100000
	MEM_PHYSICAL           = 0x400000
	MEM_RESET_UNDO         = 0x1000000
	MEM_LARGE_PAGES        = 0x20000000
	SEC_FILE               = 0x800000
	SEC_IMAGE              = 0x1000000
	SEC_RESERVE            = 0x4000000
	SEC_COMMIT             = 0x8000000
	SEC_NOCACHE            = 0x10000000
	MEM_IMAGE              = SEC_IMAGE
)
View Source
const (
	/* DrawText() Format Flags */
	DT_TOP             = 0
	DT_LEFT            = 0
	DT_CENTER          = 1
	DT_RIGHT           = 2
	DT_VCENTER         = 4
	DT_BOTTOM          = 8
	DT_WORDBREAK       = 0x10
	DT_SINGLELINE      = 0x20
	DT_EXPANDTABS      = 0x40
	DT_TABSTOP         = 0x80
	DT_NOCLIP          = 0x100
	DT_EXTERNALLEADING = 0x200
	DT_CALCRECT        = 0x400
	DT_NOPREFIX        = 0x800
	DT_INTERNAL        = 0x1000

	DT_EDITCONTROL          = 0x2000
	DT_PATH_ELLIPSIS        = 0x4000
	DT_END_ELLIPSIS         = 0x8000
	DT_MODIFYSTRING         = 0x10000
	DT_RTLREADING           = 0x20000
	DT_WORD_ELLIPSIS        = 0x40000
	DT_NOFULLWIDTHCHARBREAK = 0x0080000
	DT_HIDEPREFIX           = 0x00100000
	DT_PREFIXONLY           = 0x00200000
)
View Source
const (
	SHGFI_ICON              = 0x000000100 /* get icon */
	SHGFI_DISPLAYNAME       = 0x000000200 /* get display name */
	SHGFI_TYPENAME          = 0x000000400 /* get type name */
	SHGFI_ATTRIBUTES        = 0x000000800 /* get attributes */
	SHGFI_ICONLOCATION      = 0x000001000 /* get icon location */
	SHGFI_EXETYPE           = 0x000002000 /* return exe type */
	SHGFI_SYSICONINDEX      = 0x000004000 /* get system icon index */
	SHGFI_LINKOVERLAY       = 0x000008000 /* put a link overlay on icon */
	SHGFI_SELECTED          = 0x000010000 /* show icon in selected state */
	SHGFI_ATTR_SPECIFIED    = 0x000020000 /* get only specified attributes */
	SHGFI_LARGEICON         = 0x000000000 /* get large icon */
	SHGFI_SMALLICON         = 0x000000001 /* get small icon */
	SHGFI_OPENICON          = 0x000000002 /* get open icon */
	SHGFI_SHELLICONSIZE     = 0x000000004 /* get shell size icon */
	SHGFI_PIDL              = 0x000000008 /* pszPath is a pidl */
	SHGFI_USEFILEATTRIBUTES = 0x000000010 /* use passed dwFileAttribute */
	SHGFI_ADDOVERLAYS       = 0x000000020 /* apply the appropriate overlays */
	SHGFI_OVERLAYINDEX      = 0x000000040 /* Get the index of the overlay in the upper 8 bits of the iIcon */
)

SHGetFileInfo uFlags

View Source
const (
	SECTION_QUERY       = 1
	SECTION_MAP_WRITE   = 2
	SECTION_MAP_READ    = 4
	SECTION_MAP_EXECUTE = 8
	SECTION_EXTEND_SIZE = 0x10
	SECTION_ALL_ACCESS  = (STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE)

	FILE_READ_DATA            = 0x0001 // file & pipe
	FILE_LIST_DIRECTORY       = 0x0001 // directory
	FILE_WRITE_DATA           = 0x0002 // file & pipe
	FILE_ADD_FILE             = 0x0002 // directory
	FILE_APPEND_DATA          = 0x0004 // file
	FILE_ADD_SUBDIRECTORY     = 0x0004 // directory
	FILE_CREATE_PIPE_INSTANCE = 0x0004 // named pipe
	FILE_READ_EA              = 0x0008 // file & directory
	FILE_WRITE_EA             = 0x0010 // file & directory
	FILE_EXECUTE              = 0x0020 // file
	FILE_TRAVERSE             = 0x0020 // directory
	FILE_DELETE_CHILD         = 0x0040 // directory
	FILE_READ_ATTRIBUTES      = 0x0080 // all
	FILE_WRITE_ATTRIBUTES     = 0x0100 // all

	FILE_SHARE_READ                    = 0x00000001
	FILE_SHARE_WRITE                   = 0x00000002
	FILE_SHARE_DELETE                  = 0x00000004
	FILE_ATTRIBUTE_READONLY            = 0x00000001
	FILE_ATTRIBUTE_HIDDEN              = 0x00000002
	FILE_ATTRIBUTE_SYSTEM              = 0x00000004
	FILE_ATTRIBUTE_DIRECTORY           = 0x00000010
	FILE_ATTRIBUTE_ARCHIVE             = 0x00000020
	FILE_ATTRIBUTE_DEVICE              = 0x00000040
	FILE_ATTRIBUTE_NORMAL              = 0x00000080
	FILE_ATTRIBUTE_TEMPORARY           = 0x00000100
	FILE_ATTRIBUTE_SPARSE_FILE         = 0x00000200
	FILE_ATTRIBUTE_REPARSE_POINT       = 0x00000400
	FILE_ATTRIBUTE_COMPRESSED          = 0x00000800
	FILE_ATTRIBUTE_OFFLINE             = 0x00001000
	FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000
	FILE_ATTRIBUTE_ENCRYPTED           = 0x00004000
	FILE_ATTRIBUTE_VIRTUAL             = 0x00010000
	INVALID_FILE_ATTRIBUTES            = 0xFFFFFFFF
	FILE_NOTIFY_CHANGE_FILE_NAME       = 0x00000001
	FILE_NOTIFY_CHANGE_DIR_NAME        = 0x00000002
	FILE_NOTIFY_CHANGE_ATTRIBUTES      = 0x00000004
	FILE_NOTIFY_CHANGE_SIZE            = 0x00000008
	FILE_NOTIFY_CHANGE_LAST_WRITE      = 0x00000010
	FILE_NOTIFY_CHANGE_LAST_ACCESS     = 0x00000020
	FILE_NOTIFY_CHANGE_CREATION        = 0x00000040
	FILE_NOTIFY_CHANGE_SECURITY        = 0x00000100
	FILE_ACTION_ADDED                  = 0x00000001
	FILE_ACTION_REMOVED                = 0x00000002
	FILE_ACTION_MODIFIED               = 0x00000003
	FILE_ACTION_RENAMED_OLD_NAME       = 0x00000004
	FILE_ACTION_RENAMED_NEW_NAME       = 0x00000005
	MAILSLOT_NO_MESSAGE                = -1
	MAILSLOT_WAIT_FOREVER              = -1
	FILE_CASE_SENSITIVE_SEARCH         = 0x00000001
	FILE_CASE_PRESERVED_NAMES          = 0x00000002
	FILE_UNICODE_ON_DISK               = 0x00000004
	FILE_PERSISTENT_ACLS               = 0x00000008
	FILE_FILE_COMPRESSION              = 0x00000010
	FILE_VOLUME_QUOTAS                 = 0x00000020
	FILE_SUPPORTS_SPARSE_FILES         = 0x00000040
	FILE_SUPPORTS_REPARSE_POINTS       = 0x00000080
	FILE_SUPPORTS_REMOTE_STORAGE       = 0x00000100
	FILE_VOLUME_IS_COMPRESSED          = 0x00008000
	FILE_SUPPORTS_OBJECT_IDS           = 0x00010000
	FILE_SUPPORTS_ENCRYPTION           = 0x00020000
	FILE_NAMED_STREAMS                 = 0x00040000
	FILE_READ_ONLY_VOLUME              = 0x00080000
	FILE_SEQUENTIAL_WRITE_ONCE         = 0x00100000
	FILE_SUPPORTS_TRANSACTIONS         = 0x00200000
	FILE_SUPPORTS_HARD_LINKS           = 0x00400000
	FILE_SUPPORTS_EXTENDED_ATTRIBUTES  = 0x00800000
	FILE_SUPPORTS_OPEN_BY_FILE_ID      = 0x01000000
	FILE_SUPPORTS_USN_JOURNAL          = 0x02000000
)
View Source
const (
	IO_COMPLETION_MODIFY_STATE = 0x0002
	IO_COMPLETION_ALL_ACCESS   = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 3)
	DUPLICATE_CLOSE_SOURCE     = 0x00000001
	DUPLICATE_SAME_ACCESS      = 0x00000002
)
View Source
const (
	TH32CS_SNAPHEAPLIST = 0x00000001
	TH32CS_SNAPPROCESS  = 0x00000002
	TH32CS_SNAPTHREAD   = 0x00000004
	TH32CS_SNAPMODULE   = 0x00000008
	TH32CS_SNAPALL      = TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE
	TH32CS_INHERIT      = 0x80000000
)

The th32ProcessID argument is only used if TH32CS_SNAPHEAPLIST or TH32CS_SNAPMODULE is specified. th32ProcessID == 0 means the current process.

NOTE that all of the snapshots are global except for the heap and module

lists which are process specific. To enumerate the heap or module
state for all WIN32 processes call with TH32CS_SNAPALL and the
current process. Then for each process in the TH32CS_SNAPPROCESS
list that isn't the current process, do a call with just
TH32CS_SNAPHEAPLIST and/or TH32CS_SNAPMODULE.

dwFlags

View Source
const (
	// ChangeWindowMessageFilter  的常量, vista+
	MSGFLT_ADD    = 1
	MSGFLT_REMOVE = 2

	// ChangeWindowMessageFilterEx的常量, win7+
	MSGFLT_RESET    = 0
	MSGFLT_ALLOW    = 1
	MSGFLT_DISALLOW = 2

	//
	WM_COPYGLOBALDATA = 0x0049
)
View Source
const (
	VER_PLATFORM_WIN32s        = 0
	VER_PLATFORM_WIN32_WINDOWS = 1
	VER_PLATFORM_WIN32_NT      = 2
	VER_PLATFORM_WIN32_CE      = 3

	VER_EQUAL         = 1
	VER_GREATER       = 2
	VER_GREATER_EQUAL = 3
	VER_LESS          = 4
	VER_LESS_EQUAL    = 5
	VER_AND           = 6
	VER_OR            = 7

	VER_CONDITION_MASK              = 7
	VER_NUM_BITS_PER_CONDITION_MASK = 3

	VER_BUILDNUMBER      = 0x00000004
	VER_MAJORVERSION     = 0x00000002
	VER_MINORVERSION     = 0x00000001
	VER_PLATFORMID       = 0x00000008
	VER_SERVICEPACKMAJOR = 0x00000020
	VER_SERVICEPACKMINOR = 0x00000010
	VER_SUITENAME        = 0x00000040
	VER_PRODUCT_TYPE     = 0x00000080

	VER_NT_WORKSTATION       = 0x0000001
	VER_NT_DOMAIN_CONTROLLER = 0x0000002
	VER_NT_SERVER            = 0x0000003
)

dwPlatformId defines

View Source
const (
	INVALID_HANDLE_VALUE = ^(-1)
)
View Source
const MAX_PATH = 260
View Source
const MAX_VERS = 20
View Source
const (
	NERR_Success = 0
)
View Source
const (
	SM_SERVERR2 = 89
)
View Source
const (
	WM_SYSCOMMAND = 0x0112
)

Windows Messages

Variables

View Source
var (
	Win32MajorVersion int
	Win32MinorVersion int
	Win32BuildNumber  int
	Win32Platform     int
	ServicePackMajor  int
	Win32CSDVersion   string
)

Functions

func AnimateWindow

func AnimateWindow(hWnd HWND, dwTime, dwFlags uint32) bool

func CBool

func CBool(b bool) uintptr

GoBoolToCBool

func CStr

func CStr(str string) uintptr

内部两个 GoStrToCStr

func CallWindowProc

func CallWindowProc(lpPrevWndFunc uintptr, hWnd HWND, Msg uint32, wParam, lParam uintptr) uintptr

CallWindowProc

func ChangeWindowMessageFilter

func ChangeWindowMessageFilter(message, flags uint32) bool

ChangeWindowMessageFilter

func ChangeWindowMessageFilterEx

func ChangeWindowMessageFilterEx(hWd HWND, message, action uint32, pChangeFilterStruct *TChangeFilterStruct) bool

ChangeWindowMessageFilterEx

func CheckWin32Version

func CheckWin32Version(AMajor, AMinor int) bool

CheckWin32Version

func ChildWindowFromPoint

func ChildWindowFromPoint(hWndParent HWND, point TPoint) HWND

func ClientToScreen

func ClientToScreen(hWnd HWND, lpPoint *TPoint) bool

func ClipCursor

func ClipCursor(lpRect *TRect) bool

func CloseHandle

func CloseHandle(hObject uintptr) bool

CloseHandle

func CloseWindow

func CloseWindow(hWnd HWND) bool

func CoInitialize

func CoInitialize(pvReserved uintptr) HResult

func CoInitializeEx

func CoInitializeEx(pvReserved uintptr, coInit uint32) HResult

func CoUninitialize

func CoUninitialize()

func CreateCompatibleDC

func CreateCompatibleDC(dc HDC) HDC

func CreateDIBSection

func CreateDIBSection(dc HDC, p2 *TBitmapInfo, p3 uint32, p4 *uintptr, p5 uintptr, p6 uint32) HBITMAP

func CreateMutex

func CreateMutex(lpMutexAttributes *TSecurityAttributes, bInitialOwner bool, lpName string) uintptr

CreateMutex

func CreatePen

func CreatePen(style, width int32, color uint32) HPEN

func CreateToolhelp32SnapShot

func CreateToolhelp32SnapShot(dwFlags, th32ProcessID uint32) uintptr

CreateToolhelp32SnapShot

func DeleteDC

func DeleteDC(dc HDC) bool

func DeleteObject

func DeleteObject(p1 HGDIOBJ) bool

func DrawText

func DrawText(hDC HDC, lpString string, nCount int32, lpRect *TRect, uFormat uint32) int32

func EnableWindow

func EnableWindow(hWnd HWND, bEnable bool) bool

func EnumChildWindows

func EnumChildWindows(hWndParent HWND, lpEnumFunc TFNWndEnumProc, lParam uintptr) bool

func EnumWindows

func EnumWindows(lpEnumFunc TFNWndEnumProc, lParam uintptr) bool

func ExitProcess

func ExitProcess(uExitCode uint32)

func ExitThread

func ExitThread(dwExitCode uint32)

func ExtractIcon

func ExtractIcon(hInst uintptr, lpszExeFileName string, nIconIndex uint32) HICON

ExtractIcon

func FindResource

func FindResource(hModule HMODULE, lpName string, lpType uintptr) HRSRC

func FindWindow

func FindWindow(lpClassName, lpWindowName string) HWND

func FindWindowEx

func FindWindowEx(parent, child HWND, className, windowName string) HWND

func FixWindowsVersion

func FixWindowsVersion(MajorVersion, MinorVersion, ServicePackMajor *int)

FixWindowsVersion

func FlashWindow

func FlashWindow(hWnd HWND, bInvert bool) bool

func Free

func Free(pBlock uintptr)

Free 释放内存

func FreeLibrary

func FreeLibrary(hLibModule uintptr) bool

FreeLibrary

func FreeLibraryAndExitThread

func FreeLibraryAndExitThread(hLibModule uintptr, dwExitCode uint32)

FreeLibraryAndExitThread

func FreeResource

func FreeResource(hResData HGLOBAL) bool

func GetCapture

func GetCapture() HWND

func GetClassInfo

func GetClassInfo(hInstance uintptr, lpClassName string, lpWndClass *TWndClass) bool

func GetClassInfo2

func GetClassInfo2(hInstance uintptr, lpClassName string) (lpWndClass TWndClass, result bool)

func GetClassName

func GetClassName(hWnd HWND) (string, int32)

func GetClientRect

func GetClientRect(hWnd HWND, lpRect *TRect) bool

func GetClientRect2

func GetClientRect2(hWnd HWND) (lpRect TRect, result bool)

func GetClipCursor

func GetClipCursor(lpRect *TRect) bool

func GetClipCursor2

func GetClipCursor2() (lpRect TRect, result bool)

func GetCurrentProcess

func GetCurrentProcess() uintptr

GetCurrentProcess 返回当前进程伪句柄

func GetCurrentProcessId

func GetCurrentProcessId() uintptr

GetCurrentProcessId 返回当前进程伪句柄

func GetCurrentThread

func GetCurrentThread() uintptr

GetCurrentThread

func GetCurrentThreadId

func GetCurrentThreadId() uintptr

GetCurrentThreadId

func GetCursor

func GetCursor() HCURSOR

func GetCursorInfo

func GetCursorInfo(pci *TCursorInfo) bool

func GetCursorInfo2

func GetCursorInfo2() (pci TCursorInfo, result bool)

func GetCursorPos

func GetCursorPos(pt *TPoint) bool

func GetCursorPos2

func GetCursorPos2() (pt TPoint, result bool)

func GetDC

func GetDC(hWnd HWND) HDC

func GetDesktopPath

func GetDesktopPath() string

GetDesktopPath 获取桌面路径

func GetDesktopWindow

func GetDesktopWindow() HWND

func GetFileVersionInfo

func GetFileVersionInfo(lptstrFilename string, dwHandle, dwLen uint32, lpData uintptr) bool

GetFileVersionInfo

func GetFileVersionInfoSize

func GetFileVersionInfoSize(lptstrFileName string, lpdwhandle *uint32) uint32

GetFileVersionInfoSize

func GetLastError

func GetLastError() uint32

GetLastError

func GetModuleFileName

func GetModuleFileName(hModule uintptr) (string, uint32)

GetModuleFileName

func GetModuleFileNameEx

func GetModuleFileNameEx(hProcess uintptr, hModule HMODULE) (string, uint32)

func GetModuleHandle

func GetModuleHandle(lpModuleName string) uintptr

GetModuleHandle 获取当前是实例句柄,可传空

func GetNativeSystemInfo

func GetNativeSystemInfo(lpSystemInformation *TSystemInfo) bool

GetNativeSystemInfo

func GetProcAddress

func GetProcAddress(hModule uintptr, lpProcName string) uintptr

GetProcAddress

func GetProcessHeap

func GetProcessHeap() uintptr

func GetSelfModuleHandle

func GetSelfModuleHandle() uintptr

GetSelfModuleHandle 获取自身模块实例句柄

func GetSystemInfo

func GetSystemInfo(lpSystemInfo *TSystemInfo) bool

func GetSystemMetrics

func GetSystemMetrics(nIndex int32) int32

GetSystemMetrics

func GetTokenInformation

func GetTokenInformation(TokenHandle uintptr, TokenInformationClass TTokenInformationClass, TokenInformation uintptr, TokenInformationLength uint32,
	ReturnLength *uint32) bool

GetTokenInformation

func GetVersionEx

func GetVersionEx(lpVersionInformation *TOSVersionInfoEx) bool

获取系统版本信息

func GetWindowDC

func GetWindowDC(hWnd HWND) HDC

func GetWindowLong

func GetWindowLong(hWnd HWND, nIndex int32) int

GetWindowLong

func GetWindowLongPtr

func GetWindowLongPtr(hWnd HWND, nIndex int32) int

GetWindowLongPtr

func GetWindowRect

func GetWindowRect(hWnd HWND, lpRect *TRect) bool

func GetWindowRect2

func GetWindowRect2(hWnd HWND) (lpRect TRect, result bool)

func GetWindowRgn

func GetWindowRgn(hWnd HWND, hRgn HRGN) int32

func GetWindowText

func GetWindowText(hWnd HWND) (string, int32)

func GetWindowThreadProcessId

func GetWindowThreadProcessId(hWnd HWND, dwProcessId *uint32) uint32

func GetWindowThreadProcessId2

func GetWindowThreadProcessId2(hWnd HWND) (dwThreadId, dwProcessId uint32)

func GlobalAddAtom

func GlobalAddAtom(lpString string) ATOM

func GlobalDeleteAtom

func GlobalDeleteAtom(nAtom ATOM) ATOM

func GoBool

func GoBool(b uintptr) bool

CBoolToGoBool

func GoPtrStr

func GoPtrStr(str uintptr) string

CStrToGoStr

func GoStr

func GoStr(str []uint16) string

CStrToGoStr

func HeapAlloc

func HeapAlloc(hHeap uintptr, dwFlags uint32, dwBytes uintptr) uintptr

func HeapFree

func HeapFree(hHeap uintptr, dwFlags uint32, lpMem uintptr) bool

func InvalidateRect

func InvalidateRect(hWnd HWND, lpRect *TRect, bErase bool) bool

func InvalidateRgn

func InvalidateRgn(hWnd HWND, hRgn HRGN, bErase bool) bool

func IsAdministrator

func IsAdministrator() bool

IsAdministrator 判断当前进程是否以Administrator权限运行中

func IsBadReadPtr

func IsBadReadPtr(lp uintptr, ucb uintptr) bool

func IsChild

func IsChild(hWndParent, hWnd HWND) bool

func IsIconic

func IsIconic(hWnd HWND) bool

func IsMenu

func IsMenu(hWnd HWND) bool

func IsRectEmpty

func IsRectEmpty(lprc TRect) bool

func IsWindow

func IsWindow(hWnd HWND) bool

func IsWindowEnabled

func IsWindowEnabled(hWnd HWND) bool

func IsWindowUnicode

func IsWindowUnicode(hWnd HWND) bool

func IsWindowVisible

func IsWindowVisible(hWnd HWND) bool

func IsWow64

func IsWow64() bool

IsWow64 判断当前进程是否运行在64上 注:只有当exe为Win32并在64位系统上运行时才返回true, 否则都会返回false

func IsWow64Process

func IsWow64Process(hProcess uintptr) bool

IsWow64Process 检测进程是否运行在64位下

func IsZoomed

func IsZoomed(hWnd HWND) bool

func ListView_GetColumnWidth

func ListView_GetColumnWidth(hwnd types.HWND, iCol int32) int32

func ListView_GetItemPosition

func ListView_GetItemPosition(hWndLV types.HWND, i int32, ppt *types.TPoint) bool

func ListView_GetItemRect

func ListView_GetItemRect(hWnd types.HWND, i int32, prc *types.TRect, Code int32) bool

func ListView_GetSubItemRect

func ListView_GetSubItemRect(hwndLV types.HWND, iItem, iSubItem int32, code uint32, prc *types.TRect) bool

func ListView_SubItemHitTest

func ListView_SubItemHitTest(hwndLV types.HWND, plvhti *TLVHitTestInfo) int32

func LoadIcon

func LoadIcon(hInstance uintptr, lpIconName int) HICON

LoadIcon 从实例资源中加载icon

func LoadIcon2

func LoadIcon2(hInstance uintptr, lpIconName string) HICON

LoadIcon2 从实例资源中加载icon

func LoadLibrary

func LoadLibrary(lpLibFileName string) uintptr

LoadLibrary

func LoadLibraryEx

func LoadLibraryEx(lpLibFileName string, hFile uintptr, dwFlags uint32) uintptr

LoadLibraryEx

func LoadResource

func LoadResource(hModule uintptr, hResInfo HRSRC) HGLOBAL

func LockResource

func LockResource(hResData HGLOBAL) uintptr

func Lstrlen

func Lstrlen(lpString uintptr) int32

func LstrlenW

func LstrlenW(lpString uintptr) int32

func Malloc

func Malloc(size uintptr) uintptr

Malloc 分配内存,此为手动管理,分配后要使用Free释放

func Memcpy

func Memcpy(dest, src, count uintptr) uintptr

Memcpy 内存拷贝

func Memset

func Memset(dest uintptr, val int, count uintptr) uintptr

Memset 将指定内存区值默认为val中的,一般用于清0也是是 Memset(ptr, 0, size)

func MessageBox

func MessageBox(hWnd uintptr, lpText, lpCaption string, uType uint32) int32

MessageBox 消息框

func MoveWindow

func MoveWindow(hWnd HWND, x, y, nWidth, nHeight int32, bRepaint bool) bool

func MultiByteToWideChar

func MultiByteToWideChar(CodePage, dwFlags uint32, lpMultiByteStr uintptr, cchMultiByte int, lpWideCharStr uintptr, cchWideChar int) int

MultiByteToWideChar

func NetApiBufferFree

func NetApiBufferFree(BufPtr *WKSTA_INFO_100) uint32

func NetWkstaGetInfo100

func NetWkstaGetInfo100(ServerName string, Level uint32, BufPtr **WKSTA_INFO_100) uint32

func OpenIcon

func OpenIcon(hWnd HWND) bool

func OpenInExplorer

func OpenInExplorer(aFileName string)

OpenInExplorer 在资源管理器中定位文件

func OpenMutex

func OpenMutex(dwDesiredAccess uint32, bInheritHandle bool, lpName string) uintptr

OpenMutex

func OpenProcess

func OpenProcess(dwDesiredAccess uint32, bInheritHandle bool, dwProcessId uint32) uintptr

OpenProcess

func OpenProcessToken

func OpenProcessToken(ProcessHandle uintptr, DesiredAccess uint32, TokenHandle *uintptr) bool

OpenProcessToken

func OutputDebugString

func OutputDebugString(v ...interface{})

func PostMessage

func PostMessage(hWd HWND, msg uint32, wParam, lParam uintptr) uintptr

PostMessage

func Process32First

func Process32First(hSnapshot uintptr, lppe *TProcessEntry32) bool

Process32First

func Process32Next

func Process32Next(hSnapshot uintptr, lppe *TProcessEntry32) bool

Process32Next

func ReadProcessMemory

func ReadProcessMemory(hProcess uintptr, lpBaseAddress uintptr, lpBuffer uintptr, nSize SIZE_T, lpNumberOfBytesRead *SIZE_T) bool

func ReadProcessMemoryBytes

func ReadProcessMemoryBytes(hProcess uintptr, lpBaseAddress uintptr, nSize SIZE_T) ([]byte, bool)

func Realloc

func Realloc(P, NewSize uintptr) uintptr

Realloc 重新分配内存,此为手动管理,分配后要使用Free释放

func Rectangle

func Rectangle(dc HDC, x1, y1, x2, y2 int32) bool

func RedrawWindow

func RedrawWindow(hWnd HWND, lprcUpdate *TRect, hrgnUpdate HRGN, flags uint32) bool

func RegisterHotKey

func RegisterHotKey(hWnd HWND, id int32, fsModifiers, vk uint32) bool

func RegisterWindowMessage

func RegisterWindowMessage(lpString string) uint32

func ReleaseCapture

func ReleaseCapture() bool

func ReleaseDC

func ReleaseDC(hWnd HWND, dc HDC) int

func ReleaseMutex

func ReleaseMutex(hMutex uintptr) bool

ReleaseMutex

func ResourceToBytes

func ResourceToBytes(instance uintptr, resName string, resType uintptr) ([]byte, bool)

ResourceToBytes 查找指定实例中 指定名称、指定类型 资源,并返回资源字节

func RestoreDC

func RestoreDC(dC HDC, savedDC int32) bool

func RunAsAdministrator

func RunAsAdministrator(file, params, dir string) bool

以管理员权限运行一个程序

func SHChangeNotify

func SHChangeNotify(wEventId int32, uFlags uint32, dwItem1, dwItem2 uintptr)

SHChangeNotify

func SHGetFileInfo

func SHGetFileInfo(pszPath string, dwFileAttributes uint32, psfi *TSHFileInfo, uFlags uint32) DWORD_PTR

func SHGetPathFromIDList

func SHGetPathFromIDList(pidl *TItemIDList) (bool, string)

func SHGetSpecialFolderLocation

func SHGetSpecialFolderLocation(hwndOwner HWND, nFolder int32, ppidl **TItemIDList) HResult

func SHGetSpecialFolderPath

func SHGetSpecialFolderPath(hwndOwner HWND, lpszPath *string, nFolder int32, fCreate bool) bool

SHGetSpecialFolderPath

func SaveDC

func SaveDC(dC HDC) int32

func ScreenToClient

func ScreenToClient(hWnd HWND, lpPoint *TPoint) bool

func SelectObject

func SelectObject(dc HDC, p2 HGDIOBJ) HGDIOBJ

func SendMessage

func SendMessage(hWd HWND, msg uint32, wParam, lParam uintptr) uintptr

SendMessage

func SetBkMode

func SetBkMode(dC HDC, bkMode int32) int32

func SetCapture

func SetCapture(hWnd HWND) HWND

func SetCursorPos

func SetCursorPos(x, y int32) bool

func SetForegroundWindow

func SetForegroundWindow(hWnd HWND) bool

func SetLastError

func SetLastError(dwErrCode uint32)

SetLastError

func SetLayeredWindowAttributes

func SetLayeredWindowAttributes(hWnd HWND, crKey uint32, bAlpha byte, dwFlags uint32) bool

func SetROP2

func SetROP2(dc HDC, p2 int32) int32

func SetTextColor

func SetTextColor(dC HDC, color uint32) uint32

func SetWindowLong

func SetWindowLong(hWnd HWND, nIndex int32, dwNewLong uintptr) uintptr

SetWindowLong

func SetWindowLongPtr

func SetWindowLongPtr(hWnd HWND, nIndex int32, dwNewLong uintptr) uintptr

SetWindowLongPtr

func SetWindowPos

func SetWindowPos(hWnd, hWndInsertAfter HWND, x, y, cx, cy int32, uFlags uint32) bool

func ShellExecute

func ShellExecute(hWnd HWND, Operation, FileName, Parameters, Directory string, ShowCmd int32) uintptr

ShellExecute

func ShellExecuteEx

func ShellExecuteEx(lpExecInfo *TShellExecuteInfo) bool

func ShowCursor

func ShowCursor(bShow bool) int32

func ShowWindow

func ShowWindow(hWnd HWND, nCmdShow int32) bool

func ShowWindowAsync

func ShowWindowAsync(hWnd HWND, nCmdShow int32) bool

func SizeofResource

func SizeofResource(hModule uintptr, hResInfo HRSRC) uint32

func System

func System(aCommand string) int

System 系统命令,现在貌似不管用,以前CGO还管用的呢?Delphi也正常啊,好吧,不知道了。

func TerminateProcess

func TerminateProcess(hProcess uintptr, uExitCode uint32) bool

func TerminateThread

func TerminateThread(hThread uintptr, dwExitCode uint32) bool

func ToUInt64

func ToUInt64(r1, r2 uintptr) uint64

func TreeView_GetItem

func TreeView_GetItem(hWd types.HWND, pitem *TTVItem) bool

下面这类api参考 Winapi.CommCtrl单元 treeview api

func TreeView_SetItem

func TreeView_SetItem(hWd types.HWND, pitem TTVItem) bool

func UInt64To

func UInt64To(val uint64) (uintptr, uintptr)

func UTF8ToANSI

func UTF8ToANSI(str string) []uint8

UTF8ToANSI 将UTF-8字符转为ANSI格式

func UnregisterHotKey

func UnregisterHotKey(hWnd HWND, id int32) bool

func UpdateLayeredWindow

func UpdateLayeredWindow(handle HWND, hdcDest HDC, pptDst *TPoint, psize *TSize,
	hdcSrc HDC, pptSrc *TPoint, crKey uint32, pblend *TBlendFunction, dwFlags uint32) bool

func VerQueryValue

func VerQueryValue(pBlock uintptr, lpSubBlock string, lplpBuffer *uintptr, puLen *uint32) bool

VerQueryValue

func VerSetConditionMask

func VerSetConditionMask(dwlConditionMask uint64, dwTypeBitMask uint32, dwConditionMask uint8) uint64

VerSetConditionMask

func VerifyVersionInfo

func VerifyVersionInfo(lpVersionInformation *TOSVersionInfoEx, dwTypeMask uint32, dwlConditionMask uint64) bool

VerifyVersionInfo

func VirtualAlloc

func VirtualAlloc(lpvAddress uintptr, dwSize uintptr, flAllocationType, flProtect uint32) uintptr

func VirtualFree

func VirtualFree(lpAddress uintptr, dwSize uintptr, dwFreeType uint32) bool

func VirtualProtect

func VirtualProtect(lpAddress uintptr, dwSize uintptr, flNewProtect uint32, lpflOldProtect uintptr) bool

func VirtualQueryEx

func VirtualQueryEx(hProcess uintptr, lpAddress uintptr, lpBuffer *TMemoryBasicInformation, dwLength SIZE_T) SIZE_T

func WaitForSingleObject

func WaitForSingleObject(hHandle uintptr, dwMilliseconds uint32) uint32

func WideCharToMultiByte

func WideCharToMultiByte(CodePage, dwFlags uint32, lpWideCharStr uintptr, cchWideChar int, lpMultiByteStr uintptr, cchMultiByte int, lpDefaultChar uintptr,
	lpUsedDefaultChar *int32) int

WideCharToMultiByte

func WindowFromPhysicalPoint

func WindowFromPhysicalPoint(point TPoint) HWND

func WindowFromPoint

func WindowFromPoint(point TPoint) HWND

func WriteProcessMemory

func WriteProcessMemory(hProcess uintptr, lpBaseAddress uintptr, lpBuffer uintptr, nSize SIZE_T, lpNumberOfBytesWritten *SIZE_T) bool

func WriteProcessMemoryBytes

func WriteProcessMemoryBytes(hProcess uintptr, lpBaseAddress uintptr, lpBuffer []byte, nSize SIZE_T) (SIZE_T, bool)

Types

type HTreeItem

type HTreeItem = uintptr // _TREEITEM ptr

type TBitmapInfo

type TBitmapInfo struct {
	BmiHeader TBitmapInfoHeader
	BmiColors [1]TRGBQuad
}

type TBitmapInfoHeader

type TBitmapInfoHeader struct {
	BiSize          uint32
	BiWidth         uint32
	BiHeight        uint32
	BiPlanes        uint16
	BiBitCount      uint16
	BiCompression   uint32
	BiSizeImage     uint32
	BiXPelsPerMeter uint32
	BiYPelsPerMeter uint32
	BiClrUsed       uint32
	BiClrImportant  uint32
}

type TBlendFunction

type TBlendFunction struct {
	BlendOp             uint8
	BlendFlags          uint8
	SourceConstantAlpha uint8
	AlphaFormat         uint8
}

type TChangeFilterStruct

type TChangeFilterStruct struct {
	CbSize    uint32
	ExtStatus uint32
}

消息过滤的传入结构

type TItemIDList

type TItemIDList struct {
	Mkid TSHItemID
}

type TLVHitTestInfo

type TLVHitTestInfo struct {
	Pt       types.TPoint
	Flags    uint32
	IItem    int32
	ISubItem int32 // this is was NOT in win95.  valid only for LVM_SUBITEMHITTEST
	IGroup   int32 // readonly. index of group. only valid for owner data.

}

type TMemoryBasicInformation

type TMemoryBasicInformation struct {
	BaseAddress       uintptr
	AllocationBase    uintptr
	AllocationProtect uint32
	RegionSize        SIZE_T
	State             uint32
	Protect           uint32
	Type_9            uint32
}

type TOSVersionInfo

type TOSVersionInfo struct {
	DwOSVersionInfoSize uint32
	DwMajorVersion      uint32
	DwMinorVersion      uint32
	DwBuildNumber       uint32
	DwPlatformId        uint32
	SzCSDVersion        [128]uint16 // Maintenance UnicodeString for PSS usage

}

type TOSVersionInfoEx

type TOSVersionInfoEx struct {
	OSVersionInfoSize uint32
	MajorVersion      uint32
	MinorVersion      uint32
	BuildNumber       uint32
	PlatformId        uint32
	CSDVersion        [128]uint16 // Maintenance UnicodeString for PSS usage
	ServicePackMajor  uint16
	ServicePackMinor  uint16
	SuiteMask         uint16
	ProductType       uint8
	Reserved          uint8
}

type TProcessEntry32

type TProcessEntry32 struct {
	DwSize              uint32
	CntUsage            uint32
	Th32ProcessID       uint32 // this process
	Th2DefaultHeapID    uintptr
	Th32ModuleID        uint32 // associated exe
	CntThreads          uint32
	Th32ParentProcessID uint32 // this process's parent process
	PcPriClassBase      uint32 // Base priority of process's threads
	DwFlags             uint32
	SzExeFile           [MAX_PATH]uint16 // Path

}

type TRGBQuad

type TRGBQuad struct {
	RgbBlue     uint8
	RgbGreen    uint8
	RgbRed      uint8
	RgbReserved uint8
}

type TSHFileInfo

type TSHFileInfo struct {
	HIcon         HICON            /* out: icon */
	IIcon         Integer          /* out: icon index */
	DwAttributes  DWORD            /* out: SFGAO_ flags */
	SzDisplayName [MAX_PATH]uint16 /* out: display name (or path) */
	SzTypeName    [80]uint16       /* out: type name */
}

type TSHItemID

type TSHItemID struct {
	Cb   uint16  // Size of the ID (including cb itself)
	AbID [1]byte // The item ID (variable length)
}

type TSecurityAttributes

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

type TShellExecuteInfo

type TShellExecuteInfo struct {
	CbSize       uint32
	FMask        uint32
	Wnd          HWND
	LpVerb       LPCWSTR
	LpFile       LPCWSTR
	LpParameters LPCWSTR
	LpDirectory  LPCWSTR
	NShow        int32
	HInstApp     HINST
	// Optional fields
	LpIDList  uintptr
	LpClass   LPCWSTR
	HkeyClass HKEY
	DwHotKey  uint32

	//	0: (
	// HICON
	//	1: (
	HIcon_hMonitor uintptr

	HProcess uintptr
}

ShellExecuteEx

type TSystemInfo

type TSystemInfo struct {

	//0: (
	//dwOemId: DWORD);
	//1: (
	ProcessorArchitecture uint16
	Reserved              uint16

	PageSize                  uint32
	MinimumApplicationAddress uintptr
	MaximumApplicationAddress uintptr
	ActiveProcessorMask       uintptr
	NumberOfProcessors        uint32
	ProcessorType             uint32
	AllocationGranularity     uint32
	ProcessorLevel            uint16
	ProcessorRevision         uint16
}

type TTVItem

type TTVItem struct {
	Mask           uint32
	HItem          HTreeItem
	State          uint32
	StateMask      uint32
	PszText        uintptr
	CchTextMax     int32
	IImage         int32
	ISelectedImage int32
	CChildren      int32
	LParam         uintptr
}

type TTokenInformationClass

type TTokenInformationClass uint32
const (
	TokenUser TTokenInformationClass = iota + 1
	TokenGroups
	TokenPrivileges
	TokenOwner
	TokenPrimaryGroup
	TokenDefaultDacl
	TokenSource
	TokenType
	TokenImpersonationLevel
	TokenStatistics
	TokenRestrictedSids
	TokenSessionId
	TokenGroupsAndPrivileges
	TokenSessionReference
	TokenSandBoxInert
	TokenAuditPolicy
	TokenOrigin
	TokenElevationType
	TokenLinkedToken
	TokenElevation
	TokenHasRestrictions
	TokenAccessInformation
	TokenVirtualizationAllowed
	TokenVirtualizationEnabled
	TokenIntegrityLevel
	TokenUIAccess
	TokenMandatoryPolicy
	TokenLogonSid
	VMaxTokenInfoClass
)

type TTokenType

type TTokenType uint32
const (
	TokenTPad TTokenType = iota + 0
	TokenPrimary
	TokenImpersonation
)

type TVSFixedFileInfo

type TVSFixedFileInfo struct {
	Signature        uint32 // e.g. $feef04bd
	StrucVersion     uint32 // e.g. $00000042 = "0.42"
	FileVersionMS    uint32 // e.g. $00030075 = "3.75"
	FileVersionLS    uint32 // e.g. $00000031 = "0.31"
	ProductVersionMS uint32 // e.g. $00030010 = "3.10"
	ProductVersionLS uint32 // e.g. $00000031 = "0.31"
	FileFlagsMask    uint32 // = $3F for version "0.42"
	FileFlags        uint32 // e.g. VFF_DEBUG | VFF_PRERELEASE
	FileOS           uint32 // e.g. VOS_DOS_WINDOWS16
	FileType         uint32 // e.g. VFT_DRIVER
	FileSubtype      uint32 // e.g. VFT2_DRV_KEYBOARD
	FileDateMS       uint32 // e.g. 0
	FileDateLS       uint32 // e.g. 0
}

type WKSTA_INFO_100

type WKSTA_INFO_100 struct {
	Wki100_platform_id  uint32
	Wki100_computername uintptr // LPWSTR
	Wki100_langroup     uintptr // LPWSTR
	Wki100_ver_major    uint32
	Wki100_ver_minor    uint32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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