The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => WINDOWS.INC Project => Topic started by: ragdog on November 24, 2008, 02:44:52 PM

Title: Windows.inc Problem found
Post by: ragdog on November 24, 2008, 02:44:52 PM
Hi Hutch

I have Problem found in you windows.inc

your 1.4c RELEASE April 2008

NOTIFYICONDATAA STRUCT
  cbSize            DWORD      ?
  hwnd              DWORD      ?
  uID               DWORD      ?
  uFlags            DWORD      ?
  uCallbackMessage  DWORD      ?
  hIcon             DWORD      ?
  szTip             BYTE 64 dup (?)
NOTIFYICONDATAA ENDS

old (Version 1.28a)  02 May 2006

NOTIFYICONDATAA STRUCT
  cbSize            DWORD      ?
  hwnd              DWORD      ?
  uID               DWORD      ?
  uFlags            DWORD      ?
  uCallbackMessage  DWORD      ?
  hIcon             DWORD      ?
  szTip             BYTE       128 dup(?)
  dwState            DWORD      ?
  dwStateMask     DWORD      ?
  szInfo           BYTE       256 dup(?)
  union
     uTimeout      DWORD      ?
     uVersion      DWORD      ?
  ends
  szInfoTitle     BYTE       64 dup(?)
  dwInfoFlags     DWORD      ?
NOTIFYICONDATAA ENDS

NIF_INFO          equ 10h
NIN_BALLOONSHOW       equ WM_USER+2
NIIF_INFO          equ 1
NOTIFYICON_OLDVERSION    equ 0;
NOTIFYICON_VERSION    equ 3;
NIIF_NONE           equ 0h
NIIF_INFO           equ 1h
NIIF_WARNING        equ 2h
NIIF_ERROR          equ 3h

greets
Title: Re: Windows.inc Problem found
Post by: MichaelW on November 24, 2008, 07:11:30 PM
Every version of the MASM32 window.inc that I have on my system, the oldest being from January 2003, contains only the pre-Windows 2000 structure. Adding the later enhancements to the existing structure will break older code that sets the cbSize member to SIZEOF NOTIFYICONDATA and targets pre-Vista versions of Windows. The only good solution I can see would be to include separate structures for the later versions. A recent structure definition is  here (http://msdn.microsoft.com/en-us/library/bb773352(VS.85).aspx).