The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => WINDOWS.INC Project => Topic started by: KSS on July 05, 2006, 03:45:34 AM

Title: Some constant in WINDOWS.INC
Post by: KSS on July 05, 2006, 03:45:34 AM
VK_VOLUME_MUTE                   equ ADh
VK_VOLUME_DOWN                   equ AEh
VK_VOLUME_UP                     equ AFh

Must be:
VK_VOLUME_MUTE                   equ 0ADh
VK_VOLUME_DOWN                   equ 0AEh
VK_VOLUME_UP                     equ 0AFh



FALSE   EQU     0
TRUE    EQU     1

Must be:
FALSE   EQU     0
TRUE    EQU     NOT FALSE
Title: Re: Some constant in WINDOWS.INC
Post by: zooba on July 05, 2006, 04:58:23 AM
The TRUE/FALSE debate has gone on for a long time. VB (correctly, IMHO) defines it as you say, with false=0 and true=-1. However, C defines true=1, and since the Windows API is based on C, TRUE=1 is correct.

However, I believe in most (if not all) cases where a boolean value is required, false must equal 0 and non-zero is interpreted as true.

Cheers,

Zooba :U
Title: Re: Some constant in WINDOWS.INC
Post by: MichaelW on July 06, 2006, 07:34:23 AM
AFAIK Basics adopted -1 for TRUE to correct for the lack of a logical NOT. With a bit-wise NOT and TRUE = 1, NOT TRUE would return TRUE, instead of FALSE as the typical beginner would expect.
Title: Re: Some constant in WINDOWS.INC
Post by: Ian_B on December 13, 2006, 07:21:25 AM
I note these still missing, that I always have to supply in my definitions file:

INVALID_SET_FILE_POINTER    EQU -1
INVALID_FILE_SIZE           EQU -1
ERROR_OLD_WIN_VERSION       EQU 1150
ERROR_SINGLE_INSTANCE_APP   EQU 1152

Title: Re: Some constant in WINDOWS.INC
Post by: ToutEnMasm on December 13, 2006, 08:09:16 AM
Hello,
For errors , the project manager don't seem to be hurry to correct them.

http://www.masm32.com/board/index.php?topic=1933.msg15168#msg15168
(http://www.masm32.com/board/index.php?topic=1933.msg15168#msg15168%3Cbr%20/%3E)

For missing constants , structures,interfaces .. there is the translator here.you can add missing definitions to your source.
                                     ToutEnMasm