PyDocs

Generic Operating System Services

ctypes.wintypes

The ctypes.wintypes module provides types for use with Windows APIs. Most are aliases for types defined in ctypes. See Microsoft’s Windows data types documentation for the corresponding C definitions. On non-Windows platforms, the sizes and layouts of these types may differ from their Windows counterparts.
Symbols in ctypes.wintypes

a

ATOM
c_ushort

b

BOOL
c_long
BOOLEAN
c_ubyte
BYTE
c_ubyte

c

CHAR
c_char
COLORREF
c_ulong

d

DOUBLE
c_double
DWORD
c_ulong

f

FILETIME
A file time with dwLowDateTime and dwHighDateTime fields, both of type DWORD.
FLOAT
c_float

h

HACCEL
Aliases for HANDLE for use with specific Windows APIs.
HANDLE
An alias for c_void_p, used to represent Windows handles.
HBITMAP
Aliases for HANDLE for use with specific Windows APIs.
HBRUSH
Aliases for HANDLE for use with specific Windows APIs.
HCOLORSPACE
Aliases for HANDLE for use with specific Windows APIs.
HCONV
Aliases for HANDLE for use with specific Windows APIs.
HCONVLIST
Aliases for HANDLE for use with specific Windows APIs.
HCURSOR
Aliases for HANDLE for use with specific Windows APIs.
HDC
Aliases for HANDLE for use with specific Windows APIs.
HDDEDATA
Aliases for HANDLE for use with specific Windows APIs.
HDESK
Aliases for HANDLE for use with specific Windows APIs.
HDROP
Aliases for HANDLE for use with specific Windows APIs.
HDWP
Aliases for HANDLE for use with specific Windows APIs.
HENHMETAFILE
Aliases for HANDLE for use with specific Windows APIs.
HFILE
c_int
HFONT
Aliases for HANDLE for use with specific Windows APIs.
HGDIOBJ
Aliases for HANDLE for use with specific Windows APIs.
HGLOBAL
Aliases for HANDLE for use with specific Windows APIs.
HHOOK
Aliases for HANDLE for use with specific Windows APIs.
HICON
Aliases for HANDLE for use with specific Windows APIs.
HINSTANCE
Aliases for HANDLE for use with specific Windows APIs.
HKEY
Aliases for HANDLE for use with specific Windows APIs.
HKL
Aliases for HANDLE for use with specific Windows APIs.
HLOCAL
Aliases for HANDLE for use with specific Windows APIs.
HMENU
Aliases for HANDLE for use with specific Windows APIs.
HMETAFILE
Aliases for HANDLE for use with specific Windows APIs.
HMODULE
Aliases for HANDLE for use with specific Windows APIs.
HMONITOR
Aliases for HANDLE for use with specific Windows APIs.
HPALETTE
Aliases for HANDLE for use with specific Windows APIs.
HPEN
Aliases for HANDLE for use with specific Windows APIs.
HRESULT
c_long
HRGN
Aliases for HANDLE for use with specific Windows APIs.
HRSRC
Aliases for HANDLE for use with specific Windows APIs.
HSTR
Aliases for HANDLE for use with specific Windows APIs.
HSZ
Aliases for HANDLE for use with specific Windows APIs.
HTASK
Aliases for HANDLE for use with specific Windows APIs.
HWINSTA
Aliases for HANDLE for use with specific Windows APIs.
HWND
Aliases for HANDLE for use with specific Windows APIs.

i

INT
c_int

l

LANGID
c_ushort
LARGE_INTEGER
c_longlong
LCID
c_ulong
LCTYPE
c_ulong
LGRPID
c_ulong
LONG
c_long
LPARAM
A signed integer type with the same size as c_void_p.
LPBOOL
BOOL
LPBYTE
BYTE
LPCOLESTR
c_wchar_p
LPCOLORREF
COLORREF
LPCSTR
c_char_p
LPCVOID
c_void_p
LPCWSTR
c_wchar_p
LPDWORD
DWORD
LPFILETIME
FILETIME
LPHANDLE
HANDLE
LPLONG
LONG
LPOLESTR
c_wchar_p
LPPOINT
POINT
LPRECT
RECT
LPRECTL
RECTL
LPSC_HANDLE
SC_HANDLE
LPSIZE
SIZE
LPSIZEL
SIZEL
LPSTR
c_char_p
LPUINT
UINT
LPVOID
c_void_p
LPWIN32_FIND_DATAA
WIN32_FIND_DATAA
LPWIN32_FIND_DATAW
WIN32_FIND_DATAW
LPWORD
WORD
LPWSTR
c_wchar_p

m

MAX_PATH
The value 260, used as the size of the file-name arrays in WIN32_FIND_DATAA and WIN32_FIND_DATAW.
MSG
A Windows message with the following fields:

o

OLESTR
c_wchar_p

p

PBOOL
BOOL
PBOOLEAN
BOOLEAN
PBYTE
BYTE
PCHAR
CHAR
PDWORD
DWORD
PFILETIME
FILETIME
PFLOAT
FLOAT
PHANDLE
HANDLE
PHKEY
HKEY
PINT
INT
PLARGE_INTEGER
LARGE_INTEGER
PLCID
LCID
PLONG
LONG
PMSG
MSG
POINT
A point with x and y fields, both of type LONG.
POINTL
A point with x and y fields, both of type LONG.
PPOINT
POINT
PPOINTL
POINTL
PRECT
RECT
PRECTL
RECTL
PSHORT
SHORT
PSIZE
SIZE
PSIZEL
SIZEL
PSMALL_RECT
SMALL_RECT
PUINT
UINT
PULARGE_INTEGER
ULARGE_INTEGER
PULONG
ULONG
PUSHORT
USHORT
PWCHAR
WCHAR
PWIN32_FIND_DATAA
WIN32_FIND_DATAA
PWIN32_FIND_DATAW
WIN32_FIND_DATAW
PWORD
WORD

r

RECT
A rectangle with left, top, right, and bottom fields, all of type LONG.
RECTL
A rectangle with left, top, right, and bottom fields, all of type LONG.
RGB
Return a COLORREF value as a Python integer.

s

SC_HANDLE
Aliases for HANDLE for use with specific Windows APIs.
SERVICE_STATUS_HANDLE
Aliases for HANDLE for use with specific Windows APIs.
SHORT
c_short
SIZE
Dimensions with cx and cy fields, both of type LONG.
SIZEL
Dimensions with cx and cy fields, both of type LONG.
SMALL_RECT
A rectangle with Left, Top, Right, and Bottom fields, all of type SHORT.

t

tagMSG
A Windows message with the following fields:
tagPOINT
A point with x and y fields, both of type LONG.
tagRECT
A rectangle with left, top, right, and bottom fields, all of type LONG.
tagSIZE
Dimensions with cx and cy fields, both of type LONG.

u

UINT
c_uint
ULARGE_INTEGER
c_ulonglong
ULONG
c_ulong
USHORT
c_ushort

v

VARIANT_BOOL
A 16-bit Boolean type whose value attribute is a Python bool.

w

WCHAR
c_wchar
WIN32_FIND_DATAA
Structures used by Windows file-search functions, with the following fields.
WIN32_FIND_DATAW
Structures used by Windows file-search functions, with the following fields.
WORD
c_ushort
WPARAM
An unsigned integer type with the same size as c_void_p.