| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# wins.htm
Constants
Structures
OSVERSIONINFO
PROCESS_INFORMATION
STARTUP_INFO
SYSTEM_INFO

This file can be included to program for Windows written in EuroAssembler.

It declares the most often used constant symbols and structures used for
core functions of MS Windows Application Programming Interface (WinAPI),
as they were derived from header files in [WindowsSDK].

    wins HEAD

↑ OSVERSIONINFO
  Windows version returned by GetVersionEx().

    OSVERSIONINFO STRUC
    dwOSVersionInfoSize D DWORD ; SIZE# OSVERSIONONFO.
    dwMajorVersion      D DWORD
    dwMinorVersion      D DWORD
    dwBuildNumber       D DWORD
    dwPlatformId        D DWORD ; Win32s 0, 1, 2 = 3.1, 95, NT.
    szCSDVersion        D 128 * BYTE ; ASCIIZ info, e.g. "Service Pack 3".
     ENDSTRUC OSVERSIONINFO

↑ PROCESS_INFORMATION
  Used in CreateProcess.

    %IF %^WIDTH = 32
    PROCESS_INFORMATION STRUC
    .hProcess    D DWORD
    .hThread     D DWORD
    .dwProcessId D DWORD
    .dwThreadId  D DWORD
      ENDSTRUC PROCESS_INFORMATION
    %ENDIF

    %IF %^WIDTH = 64
    PROCESS_INFORMATION STRUC
    .hProcess    D QWORD
    .hThread     D QWORD
    .dwProcessId D DWORD
    .dwThreadId  D DWORD
      ENDSTRUC PROCESS_INFORMATION
    %ENDIF

↑ SYSTEM_INFO
  Used in GetSystemInfo function.

    %IF %^WIDTH = 32
    SYSTEM_INFO STRUC
    .OemId                     D DWORD
    .PageSize                  D DWORD
    .MinimumApplicationAddress D DWORD
    .MaximumApplicationAddress D DWORD
    .ActiveProcessorMark       D DWORD
    .NumberOfProcessors        D DWORD
    .ProcessorType             D DWORD
    .AllocationGranularity     D DWORD
    .ProcessorLevel            D WORD
    .ProcessorRevision         D WORD
     ENDSTRUC SYSTEM_INFO
    %ENDIF

    %IF %^WIDTH = 64
    SYSTEM_INFO STRUC
    .OemId                     D DWORD
    .PageSize                  D DWORD
    .MinimumApplicationAddress D DWORD
    .MaximumApplicationAddress D DWORD
    .ActiveProcessorMark       D DWORD
    .NumberOfProcessors        D DWORD
    .ProcessorType             D DWORD
    .AllocationGranularity     D DWORD
    .ProcessorLevel            D WORD
    .ProcessorRevision         D WORD
                               D DWORD ; Alignment.
     ENDSTRUC SYSTEM_INFO
    %ENDIF

↑ STARTUP_INFO
  Used in CreateProcess.

    %IF %^WIDTH = 32
    STARTUP_INFO STRUC
    .cb              D DWORD
    .lpReserved      D DWORD
    .lpDesktop       D DWORD
    .lpTitle         D DWORD
    .dwX             D DWORD
    .dwY             D DWORD
    .dwXSize         D DWORD
    .dwYSize         D DWORD
    .dwXCountChars   D DWORD
    .dwYCountChars   D DWORD
    .dwFillAttribute D DWORD
    .dwFlags         D DWORD
    .wShowWindow     D WORD
    .cbReserved2     D WORD
    .lpReserved2     D DWORD
    .hStdInput       D DWORD
    .hStdOutput      D DWORD
    .hStdError       D DWORD
       ENDSTRUC STARTUP_INFO
    %ENDIF
    %IF %^WIDTH = 64
    STARTUP_INFO STRUC
    .cb              D DWORD ; Structure size in bytes.
                     D DWORD ; Alignment.
    .lpReserved      D QWORD
    .lpDesktop       D QWORD
    .lpTitle         D QWORD
    .dwX             D DWORD
    .dwY             D DWORD
    .dwXSize         D DWORD
    .dwYSize         D DWORD
    .dwXCountChars   D DWORD
    .dwYCountChars   D DWORD
    .dwFillAttribute D DWORD
    .dwFlags         D DWORD
    .wShowWindow     D WORD
    .cbReserved2     D WORD
                     D DWORD ; Alignment.
    .lpReserved2     D QWORD
    .hStdInput       D QWORD
    .hStdOutput      D QWORD
    .hStdError       D QWORD
       ENDSTRUC STARTUP_INFO
    %ENDIF

↑ Constants
  Encoding of constant symbols used in WinAPI.

    DRIVE_UNKNOWN        = 0
    DRIVE_NO_ROOT_DIR    = 1
    DRIVE_REMOVABLE      = 2
    DRIVE_FIXED          = 3
    DRIVE_REMOTE         = 4
    DRIVE_CDROM          = 5
    DRIVE_RAMDISK        = 6

    ; Global memory flags
    GMEM_FIXED           = 0000h
    GMEM_MOVEABLE        = 0002h
    GMEM_NOCOMPACT       = 0010h
    GMEM_NODISCARD       = 0020h
    GMEM_ZEROINIT        = 0040h
    GMEM_MODIFY          = 0080h
    GMEM_DISCARDABLE     = 0100h
    GMEM_NOT_BANKED      = 1000h
    GMEM_SHARE           = 2000h
    GMEM_DDESHARE        = 2000h
    GMEM_NOTIFY          = 4000h
    GMEM_INVALID_HANDLE  = 8000h
    GMEM_VALID_FLAGS     = 7F72h
    GMEM_LOWER           = GMEM_NOT_BANKED

    HEAP_NO_SERIALIZE              = 0x00000001
    HEAP_GROWABLE                  = 0x00000002
    HEAP_GENERATE_EXCEPTIONS       = 0x00000004
    HEAP_ZERO_MEMORY               = 0x00000008
    HEAP_REALLOC_IN_PLACE_ONLY     = 0x00000010
    HEAP_TAIL_CHECKING_ENABLED     = 0x00000020
    HEAP_FREE_CHECKING_ENABLED     = 0x00000040
    HEAP_DISABLE_COALESCE_ON_FREE  = 0x00000080
    HEAP_CREATE_ALIGN_16           = 0x00010000
    HEAP_CREATE_ENABLE_TRACING     = 0x00020000

    PAGE_NOACCESS           = 0x01
    PAGE_READONLY           = 0x02
    PAGE_READWRITE          = 0x04
    PAGE_WRITECOPY          = 0x08
    PAGE_EXECUTE            = 0x10
    PAGE_EXECUTE_READ       = 0x20
    PAGE_EXECUTE_READWRITE  = 0x40
    PAGE_EXECUTE_WRITECOPY  = 0x80
    PAGE_GUARD              = 0x100
    PAGE_NOCACHE            = 0x200
    PAGE_WRITECOMBINE       = 0x400
    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_WRITE_WATCH         = 0x200000
    MEM_PHYSICAL            = 0x400000
    MEM_4MB_PAGES           = 0x80000000

    ; Code page numbers.
    CP_ACP   = 0 ; ANSI, used in GUI apps
    CP_OEMCP = 1 ; OEM, used in console apps

    ; MBCS and Unicode Translation Flags.
    MB_PRECOMPOSED       = 0x00000001  ; Use precomposed chars (single character value).
    MB_COMPOSITE         = 0x00000002  ; Use composite chars (base character followed with diacritic mark).
    MB_USEGLYPHCHARS     = 0x00000004  ; Use glyph chars instead of ctrl chars.
    MB_ERR_INVALID_CHARS = 0x00000008  ; Sigalize error for invalid input chars.

    ; STARTUP_INFO flags
    STARTF_USESHOWWINDOW    = 0x00000001
    STARTF_USESIZE          = 0x00000002
    STARTF_USEPOSITION      = 0x00000004
    STARTF_USECOUNTCHARS    = 0x00000008
    STARTF_USEFILLATTRIBUTE = 0x00000010
    STARTF_RUNFULLSCREEN    = 0x00000020
    STARTF_FORCEONFEEDBACK  = 0x00000040
    STARTF_FORCEOFFFEEDBACK = 0x00000080
    STARTF_USESTDHANDLES    = 0x00000100
    STATUS_TIMEOUT          = 0x00000102
    STATUS_PENDING          = 0x00000103
    STILL_ACTIVE            = STATUS_PENDING

    ; Color Types
    CTLCOLOR_MSGBOX               = 0
    CTLCOLOR_EDIT                 = 1
    CTLCOLOR_LISTBOX              = 2
    CTLCOLOR_BTN                  = 3
    CTLCOLOR_DLG                  = 4
    CTLCOLOR_SCROLLBAR            = 5
    CTLCOLOR_STATIC               = 6
    CTLCOLOR_MAX                  = 7
    COLOR_SCROLLBAR               = 0
    COLOR_BACKGROUND              = 1
    COLOR_ACTIVECAPTION           = 2
    COLOR_INACTIVECAPTION         = 3
    COLOR_MENU                    = 4
    COLOR_WINDOW                  = 5
    COLOR_WINDOWFRAME             = 6
    COLOR_MENUTEXT                = 7
    COLOR_WINDOWTEXT              = 8
    COLOR_CAPTIONTEXT             = 9
    COLOR_ACTIVEBORDER            = 10
    COLOR_INACTIVEBORDER          = 11
    COLOR_APPWORKSPACE            = 12
    COLOR_HIGHLIGHT               = 13
    COLOR_HIGHLIGHTTEXT           = 14
    COLOR_BTNFACE                 = 15
    COLOR_BTNSHADOW               = 16
    COLOR_GRAYTEXT                = 17
    COLOR_BTNTEXT                 = 18
    COLOR_INACTIVECAPTIONTEXT     = 19
    COLOR_BTNHIGHLIGHT            = 20
    COLOR_3DDKSHADOW              = 21
    COLOR_3DLIGHT                 = 22
    COLOR_INFOTEXT                = 23
    COLOR_INFOBK                  = 24
    COLOR_HOTLIGHT                = 26
    COLOR_GRADIENTACTIVECAPTION   = 27
    COLOR_GRADIENTINACTIVECAPTION = 28
    COLOR_DESKTOP                 = COLOR_BACKGROUND
    COLOR_3DFACE                  = COLOR_BTNFACE
    COLOR_3DSHADOW                = COLOR_BTNSHADOW
    COLOR_3DHIGHLIGHT             = COLOR_BTNHIGHLIGHT
    COLOR_3DHILIGHT               = COLOR_BTNHIGHLIGHT
    COLOR_BTNHILIGHT              = COLOR_BTNHIGHLIGHT

     ENDHEAD wins

▲Back to the top▲