News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Some constant in WINDOWS.INC

Started by KSS, July 05, 2006, 03:45:34 AM

Previous topic - Next topic

KSS

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

zooba

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

MichaelW

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.
eschew obfuscation

Ian_B

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


ToutEnMasm

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


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