WinExtra bad constants, e.g. APPLICATION_ERROR_MASKorERROR_SEVERITY_ERRORor0x100

Started by jj2007, October 04, 2015, 08:54:14 PM

Previous topic - Next topic

jj2007

I'm pretty sure the topic was raised already, but I can't find the thread... so here it is again:
line 921, WinExtra.inc:
ERROR_EXPECTED_SECTION_NAME      equ APPLICATION_ERROR_MASKorERROR_SEVERITY_ERRORor0

There are 93 of them. For those who need these exotic constants, the attached proggie creates an extra include file, to be used e.g. as

include \Masm32\include\WinExtraOrX.txt
inkey str$(ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED)

jj2007

Windows.inc:MCI_ANIM_WINDOW_PARMS STRUCT
  dwCallback    DWORD      ?
  hwnd          DWORD      ?
  nCmdShow      DWORD      ?
  lpstrText     DWORD      ?
MCI_ANIM_WINDOW_PARMS ENDS


MS VC MMSystem.h:typedef struct tagMCI_ANIM_WINDOW_PARMS {
    DWORD   dwCallback;
    HWND    hWnd;
    WORD    wReserved1;
    WORD    nCmdShow;
    WORD    wReserved2;
    LPCSTR  lpstrText;
} MCI_ANIM_WINDOW_PARMS


The VC version looks awkward ::)

Another problem:
Windows.inc:PSINJECTDATA STRUCT
  DataBytes       DWORD ?
  InjectionPoint  DWORD ?
  Flags           DWORD ?
  Reserved        DWORD ?
PSINJECTDATA ENDS


MS VC:  typedef struct _PSINJECTDATA {
    DWORD DataBytes;
    WORD  InjectionPoint;
    WORD  PageNumber;
  } PSINJECTDATA, *PPSINJECTDATA;


Finally,
Windows.inc:LOADED_IMAGE STRUCT
    ModuleName                      DWORD   ?
    hFile                           DWORD   ?
    MappedAddress                   DWORD   ?
    FileHeader                      DWORD   ?
    LastRvaSection                  DWORD   ?
    NumberOfSections                DWORD   ?
    Sections                        DWORD   ?
    Characteristics                 DWORD   ?
    fSystemImage                    BYTE    ?
    fDOSImage                       BYTE    ?
    Links                           DWORD   ?
    SizeOfImage                     DWORD   ?
LOADED_IMAGE ENDS


MS VC ImageHlp.h:typedef struct _LOADED_IMAGE {
    PSTR                  ModuleName;
    HANDLE                hFile;
    PUCHAR                MappedAddress;
#ifdef _IMAGEHLP64
    PIMAGE_NT_HEADERS64   FileHeader;
#else
    PIMAGE_NT_HEADERS32   FileHeader;
#endif
    PIMAGE_SECTION_HEADER LastRvaSection;
    ULONG                 NumberOfSections;
    PIMAGE_SECTION_HEADER Sections;
    ULONG                 Characteristics;
    BOOLEAN               fSystemImage;
    BOOLEAN               fDOSImage;
    BOOLEAN               fReadOnly;
    UCHAR                 Version;
    LIST_ENTRY            Links;
    ULONG                 SizeOfImage;
} LOADED_IMAGE, *PLOADED_IMAGE;


LIST_ENTRY is two DWORDs.

TWell

Quote from: jj2007 on August 26, 2016, 09:01:54 AM
The VC version looks awkward ::)
WSDK 7.1 and WDDK 7600
typedef struct tagMCI_ANIM_WINDOW_PARMSA {
    DWORD_PTR   dwCallback;
    HWND        hWnd;
    UINT        nCmdShow;
    LPCSTR     lpstrText;
} MCI_ANIM_WINDOW_PARMSA, *PMCI_ANIM_WINDOW_PARMSA, * LPMCI_ANIM_WINDOW_PARMSA;
typedef struct tagMCI_ANIM_WINDOW_PARMSW {
    DWORD_PTR   dwCallback;
    HWND        hWnd;
    UINT        nCmdShow;
    LPCWSTR    lpstrText;
} MCI_ANIM_WINDOW_PARMSW, *PMCI_ANIM_WINDOW_PARMSW, * LPMCI_ANIM_WINDOW_PARMSW;
MCI_ANIM_WINDOW_PARMS 16 10h bytes
dwCallback +0h
hWnd       +4h
nCmdShow   +8h
lpstrText  +Ch