winapi: github.com/jthmath/winapi Index | Files | Directories

package winapi

import "github.com/jthmath/winapi"

Index

Package Files

base.go def.go error.go fileapi.go gdi.go go-get.go guid.go helper.go init.go kernel.go menu.go message.go namedpipeapi.go types.go user.go winapi.go winnt.go

Constants

const (
    FILE_FLAG_WRITE_THROUGH       = 0x80000000
    FILE_FLAG_OVERLAPPED          = 0x40000000
    FILE_FLAG_NO_BUFFERING        = 0x20000000
    FILE_FLAG_RANDOM_ACCESS       = 0x10000000
    FILE_FLAG_SEQUENTIAL_SCAN     = 0x08000000
    FILE_FLAG_DELETE_ON_CLOSE     = 0x04000000
    FILE_FLAG_BACKUP_SEMANTICS    = 0x02000000
    FILE_FLAG_POSIX_SEMANTICS     = 0x01000000
    FILE_FLAG_SESSION_AWARE       = 0x00800000
    FILE_FLAG_OPEN_REPARSE_POINT  = 0x00200000
    FILE_FLAG_OPEN_NO_RECALL      = 0x00100000
    FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000
)

These are flags supported through CreateFile (W7) and CreateFile2 (W8 and beyond)

const (
    FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200
    FORMAT_MESSAGE_FROM_STRING    = 0x00000400
    FORMAT_MESSAGE_FROM_HMODULE   = 0x00000800
    FORMAT_MESSAGE_FROM_SYSTEM    = 0x00001000
    FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000
    FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF
)
const (
    CREATE_NEW        = 1
    CREATE_ALWAYS     = 2
    OPEN_EXISTING     = 3
    OPEN_ALWAYS       = 4
    TRUNCATE_EXISTING = 5
)
const (
    FILE_BEGIN   = 0
    FILE_CURRENT = 1
    FILE_END     = 2
)
const (
    SRCCOPY        uint32 = 0x00CC0020 // dest = source
    SRCPAINT       uint32 = 0x00EE0086 // dest = source OR dest
    SRCAND         uint32 = 0x008800C6 // dest = source AND dest
    SRCINVERT      uint32 = 0x00660046 // dest = source XOR dest
    SRCERASE       uint32 = 0x00440328 // dest = source AND (NOT dest )
    NOTSRCCOPY     uint32 = 0x00330008 // dest = (NOT source)
    NOTSRCERASE    uint32 = 0x001100A6 // dest = (NOT src) AND (NOT dest)
    MERGECOPY      uint32 = 0x00C000CA // dest = (source AND pattern)
    MERGEPAINT     uint32 = 0x00BB0226 // dest = (NOT source) OR dest
    PATCOPY        uint32 = 0x00F00021 // dest = pattern
    PATPAINT       uint32 = 0x00FB0A09 // dest = DPSnoo
    PATINVERT      uint32 = 0x005A0049 // dest = pattern XOR dest
    DSTINVERT      uint32 = 0x00550009 // dest = (NOT dest)
    BLACKNESS      uint32 = 0x00000042 // dest = BLACK
    WHITENESS      uint32 = 0x00FF0062 // dest = WHITE
    NOMIRRORBITMAP uint32 = 0x80000000 // Do not Mirror the bitmap in this call
    CAPTUREBLT     uint32 = 0x40000000 // Include layered windows
)

Ternary raster operations

const (
    MF_INSERT = 0x00000000
    MF_CHANGE = 0x00000080
    MF_APPEND = 0x00000100
    MF_DELETE = 0x00000200
    MF_REMOVE = 0x00001000

    MF_BYCOMMAND  = 0x00000000
    MF_BYPOSITION = 0x00000400

    MF_SEPARATOR = 0x00000800

    MF_ENABLED  = 0x00000000
    MF_GRAYED   = 0x00000001
    MF_DISABLED = 0x00000002

    MF_UNCHECKED       = 0x00000000
    MF_CHECKED         = 0x00000008
    MF_USECHECKBITMAPS = 0x00000200

    MF_STRING    = 0x00000000
    MF_BITMAP    = 0x00000004
    MF_OWNERDRAW = 0x00000100

    MF_POPUP        = 0x00000010
    MF_MENUBARBREAK = 0x00000020
    MF_MENUBREAK    = 0x00000040

    MF_UNHILITE = 0x00000000
    MF_HILITE   = 0x00000080

    MF_DEFAULT = 0x00001000

    MF_SYSMENU      = 0x00002000
    MF_HELP         = 0x00004000
    MF_RIGHTJUSTIFY = 0x00004000

    MF_MOUSESELECT = 0x00008000
    MF_END         = 0x00000080 // Obsolete -- only used by old RES files
)
const (
    WM_NULL    uint32 = 0x0000
    WM_CREATE  uint32 = 0x0001
    WM_DESTROY uint32 = 0x0002
    WM_MOVE    uint32 = 0x0003
    WM_SIZE    uint32 = 0x0005

    WM_ACTIVATE uint32 = 0x0006

    WM_PAINT uint32 = 0x000F

    /*
     * WM_ACTIVATE state values
     */
    WA_INACTIVE    = 0
    WA_ACTIVE      = 1
    WA_CLICKACTIVE = 2

    WM_CLOSE uint32 = 0x0010
    WM_QUIT  uint32 = 0x0012

    WM_GETMINMAXINFO uint32 = 0x0024

    WM_COMMAND uint32 = 0x0111
)
const (
    PIPE_ACCESS_INBOUND  = 0x00000001
    PIPE_ACCESS_OUTBOUND = 0x00000002
    PIPE_ACCESS_DUPLEX   = 0x00000003
)

Define the dwOpenMode values for CreateNamedPipe

const (
    PIPE_CLIENT_END = 0x00000000
    PIPE_SERVER_END = 0x00000001
)

Define the Named Pipe End flags for GetNamedPipeInfo

const (
    PIPE_WAIT                  = 0x00000000
    PIPE_NOWAIT                = 0x00000001
    PIPE_READMODE_BYTE         = 0x00000000
    PIPE_READMODE_MESSAGE      = 0x00000002
    PIPE_TYPE_BYTE             = 0x00000000
    PIPE_TYPE_MESSAGE          = 0x00000004
    PIPE_ACCEPT_REMOTE_CLIENTS = 0x00000000
    PIPE_REJECT_REMOTE_CLIENTS = 0x00000008
)

Define the dwPipeMode values for CreateNamedPipe

const (
    CS_VREDRAW         uint32 = 0x0001
    CS_HREDRAW         uint32 = 0x0002
    CS_DBLCLKS         uint32 = 0x0008
    CS_OWNDC           uint32 = 0x0020
    CS_CLASSDC         uint32 = 0x0040
    CS_PARENTDC        uint32 = 0x0080
    CS_NOCLOSE         uint32 = 0x0200
    CS_SAVEBITS        uint32 = 0x0800
    CS_BYTEALIGNCLIENT uint32 = 0x1000
    CS_BYTEALIGNWINDOW uint32 = 0x2000
    CS_GLOBALCLASS     uint32 = 0x4000
    CS_IME             uint32 = 0x00010000
    CS_DROPSHADOW      uint32 = 0x00020000
)
const (
    MB_OK                uint32 = 0x00000000
    MB_OKCANCEL          uint32 = 0x00000001
    MB_ABORTRETRYIGNORE  uint32 = 0x00000002
    MB_YESNOCANCEL       uint32 = 0x00000003
    MB_YESNO             uint32 = 0x00000004
    MB_RETRYCANCEL       uint32 = 0x00000005
    MB_CANCELTRYCONTINUE uint32 = 0x00000006
    MB_HELP              uint32 = 0x00004000

    MB_ICONERROR uint32 = 0x00000010
)
const (
    SW_HIDE            int32 = 0
    SW_SHOWNORMAL      int32 = 1
    SW_NORMAL          int32 = 1
    SW_SHOWMINIMIZED   int32 = 2
    SW_SHOWMAXIMIZED   int32 = 3
    SW_MAXIMIZE        int32 = 3
    SW_SHOWNOACTIVATE  int32 = 4
    SW_SHOW            int32 = 5
    SW_MINIMIZE        int32 = 6
    SW_SHOWMINNOACTIVE int32 = 7
    SW_SHOWNA          int32 = 8
    SW_RESTORE         int32 = 9
    SW_SHOWDEFAULT     int32 = 10
    SW_FORCEMINIMIZE   int32 = 11
    SW_MAX             int32 = 11
)
const (
    IMAGE_BITMAP = 0
    IMAGE_CURSOR = 2
    IMAGE_ICON   = 1
)
const (
    LR_CREATEDIBSECTION = 0x00002000
    LR_DEFAULTCOLOR     = 0x00000000
    LR_DEFAULTSIZE      = 0x00000040
    LR_LOADFROMFILE     = 0x00000010
    LR_LOADMAP3DCOLORS  = 0x00001000
    LR_LOADTRANSPARENT  = 0x00000020
    LR_MONOCHROME       = 0x00000001
    LR_SHARED           = 0x00008000
    LR_VGACOLOR         = 0x00000080
)
const (
    WS_OVERLAPPED   uint32 = 0x00000000
    WS_POPUP        uint32 = 0x80000000
    WS_CHILD        uint32 = 0x40000000
    WS_MINIMIZE     uint32 = 0x20000000
    WS_VISIBLE      uint32 = 0x10000000
    WS_DISABLED     uint32 = 0x08000000
    WS_CLIPSIBLINGS uint32 = 0x04000000
    WS_CLIPCHILDREN uint32 = 0x02000000
    WS_MAXIMIZE     uint32 = 0x01000000
    WS_CAPTION      uint32 = 0x00C00000 // WS_BORDER | WS_DLGFRAME
    WS_BORDER       uint32 = 0x00800000
    WS_DLGFRAME     uint32 = 0x00400000
    WS_VSCROLL      uint32 = 0x00200000
    WS_HSCROLL      uint32 = 0x00100000
    WS_SYSMENU      uint32 = 0x00080000
    WS_THICKFRAME   uint32 = 0x00040000
    WS_GROUP        uint32 = 0x00020000
    WS_TABSTOP      uint32 = 0x00010000

    WS_MINIMIZEBOX uint32 = 0x00020000
    WS_MAXIMIZEBOX uint32 = 0x00010000

    WS_TILED       uint32 = WS_OVERLAPPED
    WS_ICONIC      uint32 = WS_MINIMIZE
    WS_SIZEBOX     uint32 = WS_THICKFRAME
    WS_TILEDWINDOW uint32 = WS_OVERLAPPEDWINDOW

    /*
     * Common Window Styles
     */
    WS_OVERLAPPEDWINDOW uint32 = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU |
        WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX

    WS_POPUPWINDOW uint32 = WS_POPUP | WS_BORDER | WS_SYSMENU

    WS_CHILDWINDOW uint32 = WS_CHILD
)

* Window Styles

const (
    WS_EX_DLGMODALFRAME  uint32 = 0x00000001
    WS_EX_NOPARENTNOTIFY uint32 = 0x00000004
    WS_EX_TOPMOST        uint32 = 0x00000008
    WS_EX_ACCEPTFILES    uint32 = 0x00000010
    WS_EX_TRANSPARENT    uint32 = 0x00000020

    WS_EX_MDICHILD    uint32 = 0x00000040
    WS_EX_TOOLWINDOW  uint32 = 0x00000080
    WS_EX_WINDOWEDGE  uint32 = 0x00000100
    WS_EX_CLIENTEDGE  uint32 = 0x00000200
    WS_EX_CONTEXTHELP uint32 = 0x00000400

    WS_EX_RIGHT          uint32 = 0x00001000
    WS_EX_LEFT           uint32 = 0x00000000
    WS_EX_RTLREADING     uint32 = 0x00002000
    WS_EX_LTRREADING     uint32 = 0x00000000
    WS_EX_LEFTSCROLLBAR  uint32 = 0x00004000
    WS_EX_RIGHTSCROLLBAR uint32 = 0x00000000

    WS_EX_CONTROLPARENT uint32 = 0x00010000
    WS_EX_STATICEDGE    uint32 = 0x00020000
    WS_EX_APPWINDOW     uint32 = 0x00040000

    WS_EX_OVERLAPPEDWINDOW uint32 = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE
    WS_EX_PALETTEWINDOW    uint32 = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST

    WS_EX_LAYERED uint32 = 0x00080000

    WS_EX_NOINHERITLAYOUT uint32 = 0x00100000 // Disable inheritence of mirroring by children

    WS_EX_NOREDIRECTIONBITMAP uint32 = 0x00200000

    WS_EX_LAYOUTRTL uint32 = 0x00400000 // Right to left mirroring

    WS_EX_COMPOSITED uint32 = 0x02000000
    WS_EX_NOACTIVATE uint32 = 0x08000000
)

* Extended Window Styles

const (
    DELETE       = 0x00010000
    READ_CONTROL = 0x00020000
    WRITE_DAC    = 0x00040000
    WRITE_OWNER  = 0x00080000
    SYNCHRONIZE  = 0x00100000

    STANDARD_RIGHTS_REQUIRED = 0x000F0000

    STANDARD_RIGHTS_READ    = READ_CONTROL
    STANDARD_RIGHTS_WRITE   = READ_CONTROL
    STANDARD_RIGHTS_EXECUTE = READ_CONTROL

    STANDARD_RIGHTS_ALL = 0x001F0000

    SPECIFIC_RIGHTS_ALL = 0x0000FFFF
)

The following are masks for the predefined standard access types

const (
    GENERIC_READ    = 0x80000000
    GENERIC_WRITE   = 0x40000000
    GENERIC_EXECUTE = 0x20000000
    GENERIC_ALL     = 0x10000000
)

These are the generic rights.

const (
    FILE_SHARE_READ   = 0x00000001
    FILE_SHARE_WRITE  = 0x00000002
    FILE_SHARE_DELETE = 0x00000004
)
const ACCESS_SYSTEM_SECURITY = 0x01000000

AccessSystemAcl access type

const CW_USEDEFAULT int32 = ^int32(0x7FFFFFFF) // 0x80000000
const (
    IDC_ARROW = 32512
)
const MAXIMUM_ALLOWED = 0x02000000

MaximumAllowed access type

const PIPE_UNLIMITED_INSTANCES = 255

Define the well known values for CreateNamedPipe nMaxInstances

func AppendMenu Uses

func AppendMenu(hMenu HMENU, Flags uint32, IdNewItem uintptr, NewItem string) error

func BitBlt Uses

func BitBlt(hdcDest HDC, nXDest int32, nYdest int32, nWidth int32, nHeight int32,
    hdcSrc HDC, nXSrc int32, nYSrc int32, Rop uint32) error

func ByteArrayToUint32LittleEndian Uses

func ByteArrayToUint32LittleEndian(b [4]byte) uint32

func ByteArrayToUint64LittleEndian Uses

func ByteArrayToUint64LittleEndian(b [8]byte) uint64

func CloseHandle Uses

func CloseHandle(h HANDLE) (err error)

func ConnectNamedPipe Uses

func ConnectNamedPipe(hNamedPipe HANDLE, po *OVERLAPPED) (err error)

func DefWindowProc Uses

func DefWindowProc(hWnd HWND, message uint32, wParam uintptr, lParam uintptr) uintptr

func DeleteDC Uses

func DeleteDC(dc HDC) error

func DeleteObject Uses

func DeleteObject(obj HGDIOBJ) error

func DestroyMenu Uses

func DestroyMenu(hMenu HMENU) (err error)

func DestroyWindow Uses

func DestroyWindow(hWnd HWND) (err error)

func DispatchMessage Uses

func DispatchMessage(pMsg *MSG) uintptr

func EndPaint Uses

func EndPaint(hWnd HWND, ps *PAINTSTRUCT)

func ErrorAssert Uses

func ErrorAssert(err error)

func ErrorBox Uses

func ErrorBox(err error) error

func ExitProcess Uses

func ExitProcess(ExitCode uint32)

func FormatMessage Uses

func FormatMessage(flags uint32, msgsrc interface{}, msgid uint32, langid uint32, args *byte) (string, error)

func GetMessage Uses

func GetMessage(pMsg *MSG, hWnd HWND, wMsgFilterMin uint32, wMsgFilterMax uint32) int32

func GetObject Uses

func GetObject(gdiobj HGDIOBJ, cbBuffer int32, pv *byte) int32

int GetObject(

_In_   HGDIOBJ hgdiobj,
_In_   int cbBuffer,
_Out_  LPVOID lpvObject

);

func HiWord Uses

func HiWord(a uint32) uint16

func IS_INTRESOURCE Uses

func IS_INTRESOURCE(r uintptr) bool

func LoWord Uses

func LoWord(a uint32) uint16

func LoadString Uses

func LoadString(hInstance HINSTANCE, id uint16) (string, error)

func MakeIntResource Uses

func MakeIntResource(id uint16) uintptr

func MessageBox Uses

func MessageBox(hWnd HWND, Text string, Caption string, Type uint32) (ret int32, err error)

func MustErrorBox Uses

func MustErrorBox(err error)

func MustMessageBox Uses

func MustMessageBox(hWnd HWND, Text string, Caption string, Type uint32) (ret int32)

func PostQuitMessage Uses

func PostQuitMessage(ExitCode int32)

func ReadFile Uses

func ReadFile(hFile HANDLE, buf []byte, pOverlapped *OVERLAPPED) (uint32, error)

func RegisterClass Uses

func RegisterClass(pWndClass *WNDCLASS) (atom uint16, err error)

func RegisterWindowMessage Uses

func RegisterWindowMessage(str string) (message uint32, err error)

func SetFilePointer Uses

func SetFilePointer(hFile HANDLE, DistanceToMove int64, MoveMethod uint32) (NewPointer int64, err error)

func ShowWindow Uses

func ShowWindow(hWnd HWND, CmdShow int32) bool

返回值:如果窗口事先是可见的,返回true

如果窗口事先是隐藏的,返回false

func TranslateMessage Uses

func TranslateMessage(pMsg *MSG) error

func UTF16FromMultiStrings Uses

func UTF16FromMultiStrings(sl []string) ([]uint16, error)

func UTF16ToMultiString Uses

func UTF16ToMultiString(u []uint16) (sl []string, err error)

func Uint32ToByteArrayLittleEndian Uses

func Uint32ToByteArrayLittleEndian(n uint32) (r [4]byte)

func Uint64ToByteArrayLittleEndian Uses

func Uint64ToByteArrayLittleEndian(n uint64) (r [8]byte)

func UpdateWindow Uses

func UpdateWindow(hWnd HWND) error

func WinErrorAssert Uses

func WinErrorAssert(err error)

func WriteFile Uses

func WriteFile(hFile HANDLE, buf []byte, pOverlapped *OVERLAPPED) (uint32, error)

type ACCESS_MASK Uses

type ACCESS_MASK uint32

type BITMAP Uses

type BITMAP struct {
    BmType       int32
    BmWidth      int32
    BmHeight     int32
    BmWidthBytes int32
    BmPlanes     uint16
    BmBitsPixel  uint16
    BmBits       uintptr
}

type GUID Uses

type GUID struct {
    Data1 uint32
    Data2 uint16
    Data3 uint16
    Data4 [8]uint8
}

func MakeGuid Uses

func MakeGuid(str string) (r GUID, err error)

func MustMakeGuid Uses

func MustMakeGuid(str string) GUID

func (GUID) String Uses

func (this GUID) String() string

type HANDLE Uses

type HANDLE uintptr
const INVALID_HANDLE_VALUE HANDLE = HANDLE(^uintptr(0))

func CreateFile Uses

func CreateFile(FileName string, DesiredAccess uint32, ShareMode uint32,
    sa *SECURITY_ATTRIBUTES,
    CreationDisposition uint32, FlagsAndAttributes uint32,
    TemplateFile HANDLE) (HANDLE, error)

打开文件的方法如下: CreateFile("D:/123.txt")

func CreateNamedPipe Uses

func CreateNamedPipe(
    name string,
    openMode uint32,
    pipeMode uint32,
    maxInstances uint32,
    outBufferSize uint32,
    inBufferSize uint32,
    defaultTimeOut time.Duration,
    sa *SECURITY_ATTRIBUTES) (h HANDLE, err error)

func LoadImageById Uses

func LoadImageById(hinst HINSTANCE, id uint16, Type uint32,
    cxDesired int32, cyDesired int32, fLoad uint32) (hImage HANDLE, err error)

func LoadImageByName Uses

func LoadImageByName(hinst HINSTANCE, name string, Type uint32,
    cxDesired int32, cyDesired int32, fLoad uint32) (hImage HANDLE, err error)

type HBITMAP Uses

type HBITMAP uintptr

func LoadBitmapById Uses

func LoadBitmapById(hInst HINSTANCE, id uint16) (HBITMAP, error)

func LoadBitmapByName Uses

func LoadBitmapByName(hInst HINSTANCE, Name string) (HBITMAP, error)

type HBRUSH Uses

type HBRUSH uintptr
const (
    CTLCOLOR_MSGBOX HBRUSH = iota
    CTLCOLOR_EDIT
    CTLCOLOR_LISTBOX
    CTLCOLOR_BTN
    CTLCOLOR_DLG
    CTLCOLOR_SCROLLBAR
    CTLCOLOR_STATIC
    CTLCOLOR_MAX

    COLOR_SCROLLBAR           HBRUSH = 0
    COLOR_BACKGROUND          HBRUSH = 1
    COLOR_ACTIVECAPTION       HBRUSH = 2
    COLOR_INACTIVECAPTION     HBRUSH = 3
    COLOR_MENU                HBRUSH = 4
    COLOR_WINDOW              HBRUSH = 5
    COLOR_WINDOWFRAME         HBRUSH = 6
    COLOR_MENUTEXT            HBRUSH = 7
    COLOR_WINDOWTEXT          HBRUSH = 8
    COLOR_CAPTIONTEXT         HBRUSH = 9
    COLOR_ACTIVEBORDER        HBRUSH = 10
    COLOR_INACTIVEBORDER      HBRUSH = 11
    COLOR_APPWORKSPACE        HBRUSH = 12
    COLOR_HIGHLIGHT           HBRUSH = 13
    COLOR_HIGHLIGHTTEXT       HBRUSH = 14
    COLOR_BTNFACE             HBRUSH = 15
    COLOR_BTNSHADOW           HBRUSH = 16
    COLOR_GRAYTEXT            HBRUSH = 17
    COLOR_BTNTEXT             HBRUSH = 18
    COLOR_INACTIVECAPTIONTEXT HBRUSH = 19
    COLOR_BTNHIGHLIGHT        HBRUSH = 20

    COLOR_3DDKSHADOW HBRUSH = 21
    COLOR_3DLIGHT    HBRUSH = 22
    COLOR_INFOTEXT   HBRUSH = 23
    COLOR_INFOBK     HBRUSH = 24

    COLOR_HOTLIGHT                HBRUSH = 26 // 上一个是24,所以这里不能直接用iota
    COLOR_GRADIENTACTIVECAPTION   HBRUSH = 27
    COLOR_GRADIENTINACTIVECAPTION HBRUSH = 28
    COLOR_MENUHILIGHT             HBRUSH = 29
    COLOR_MENUBAR                 HBRUSH = 30

    COLOR_DESKTOP     = COLOR_BACKGROUND
    COLOR_3DFACE      = COLOR_BTNFACE
    COLOR_3DSHADOW    = COLOR_BTNSHADOW
    COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
    COLOR_3DHILIGHT   = COLOR_BTNHIGHLIGHT
    COLOR_BTNHILIGHT  = COLOR_BTNHIGHLIGHT
)

type HCURSOR Uses

type HCURSOR uintptr

func LoadCursorById Uses

func LoadCursorById(hinst HINSTANCE, id uint16) (cursor HCURSOR, err error)

func LoadCursorByName Uses

func LoadCursorByName(hinst HINSTANCE, name string) (cursor HCURSOR, err error)

type HDC Uses

type HDC uintptr

func BeginPaint Uses

func BeginPaint(hWnd HWND, ps *PAINTSTRUCT) (hdc HDC, err error)

func CreateCompatibleDC Uses

func CreateCompatibleDC(dc HDC) (HDC, error)

type HGDIOBJ Uses

type HGDIOBJ uintptr
const HGDI_ERROR HGDIOBJ = HGDIOBJ(^uintptr(0))

func SelectObject Uses

func SelectObject(hdc HDC, hgdiobj HGDIOBJ) (robj HGDIOBJ, err error)

HGDIOBJ SelectObject(

_In_  HDC hdc,
_In_  HGDIOBJ hgdiobj

);

type HICON Uses

type HICON uintptr

func LoadIconById Uses

func LoadIconById(hinst HINSTANCE, id uint16) (icon HICON, err error)

func LoadIconByName Uses

func LoadIconByName(hinst HINSTANCE, name string) (icon HICON, err error)

type HINSTANCE Uses

type HINSTANCE uintptr

func GetModuleHandle Uses

func GetModuleHandle(ModuleName string) (h HINSTANCE, err error)

type HMENU Uses

type HMENU uintptr

func CreateMenu Uses

func CreateMenu() (hMenu HMENU, err error)

func CreatePopupMenu Uses

func CreatePopupMenu() (hMenu HMENU, err error)

type HMODULE Uses

type HMODULE uintptr

type HRESULT Uses

type HRESULT int32
const (
    S_OK    HRESULT = 0
    S_FALSE HRESULT = 1

    E_NOTIMPL HRESULT = (0x80004001 & 0x7FFFFFFF) | (^0x7FFFFFFF)
)

func (HRESULT) Error Uses

func (hr HRESULT) Error() string

func (HRESULT) Failed Uses

func (hr HRESULT) Failed() bool

func (HRESULT) Succeeded Uses

func (hr HRESULT) Succeeded() bool

type HWND Uses

type HWND uintptr

func CreateWindow Uses

func CreateWindow(ClassName string, WindowName string, Style uint32, ExStyle uint32,
    X int32, Y int32, Width int32, Height int32,
    WndParent HWND, Menu HMENU, inst HINSTANCE, Param uintptr) (hWnd HWND, err error)

type MSG Uses

type MSG struct {
    Hwnd    HWND
    Message uint32
    WParam  uintptr
    LParam  uintptr
    Time    uint32
    Pt      POINT
}

type OVERLAPPED Uses

type OVERLAPPED struct {
    Internal     uintptr
    InternalHigh uintptr
    Offset       uint32
    OffsetHigh   uint32
    HEvent       HANDLE
}

type PAINTSTRUCT Uses

type PAINTSTRUCT struct {
    Hdc         HDC
    FErase      int32
    RcPaint     RECT
    FRestore    int32
    FIncUpdate  int32
    RGBReserved [32]byte
}

typedef struct tagPAINTSTRUCT {

HDC         hdc;
BOOL        fErase;
RECT        rcPaint;
BOOL        fRestore;
BOOL        fIncUpdate;
BYTE        rgbReserved[32];

} PAINTSTRUCT

type POINT Uses

type POINT struct {
    X   int32
    Y   int32
}

type RECT Uses

type RECT struct {
    Left   int32
    Top    int32
    Right  int32
    Bottom int32
}

type SECURITY_ATTRIBUTES Uses

type SECURITY_ATTRIBUTES struct {
    Length             uint32
    SecurityDescriptor uintptr
    InheritHandle      int32
}

typedef struct _SECURITY_ATTRIBUTES {

DWORD  nLength;
void   *pSecurityDescriptor;
BOOL   bInheritHandle;

} SECURITY_ATTRIBUTES;

type WNDCLASS Uses

type WNDCLASS struct {
    Style         uint32
    PfnWndProc    WNDPROC
    CbClsExtra    int32
    CbWndExtra    int32
    HInstance     HINSTANCE
    HIcon         HICON
    HCursor       HCURSOR
    HbrBackground HBRUSH
    Menu          interface{}
    PszClassName  string
    HIconSmall    HICON
}

type WNDPROC Uses

type WNDPROC func(HWND, uint32, uintptr, uintptr) uintptr

type WinErrorCode Uses

type WinErrorCode uint32

func GetLastError Uses

func GetLastError() WinErrorCode

func (WinErrorCode) Error Uses

func (this WinErrorCode) Error() string

Directories

PathSynopsis
com
reg

Package winapi imports 6 packages (graph) and is imported by 4 packages. Updated 2017-05-10. Refresh now. Tools for package owners.