News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Constant Names Used But Not Defined

Started by dedndave, September 09, 2014, 11:43:58 PM

Previous topic - Next topic

dedndave

in discussion of window class names, i came across a group of constant names used that are not defined

http://masm32.com/board/index.php?topic=3584.0

about 3/4 of the way down windows.inc...

LPNMDATETIMESTRING               equ LPNMDATETIMESTRINGA
LPNMDATETIMEWMKEYDOWN            equ LPNMDATETIMEWMKEYDOWNA
LPNMDATETIMEFORMAT               equ LPNMDATETIMEFORMATA
LPNMDATETIMEFORMATQUERY          equ LPNMDATETIMEFORMATQUERYA
WC_PAGESCROLLER                  equ WC_PAGESCROLLERA


the right-hand side constants are not previously defined (nor are their W counterparts)

guga

Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

Gunther

Hi Dave,

Quote from: dedndave on September 09, 2014, 11:43:58 PM

LPNMDATETIMESTRING               equ LPNMDATETIMESTRINGA
LPNMDATETIMEWMKEYDOWN            equ LPNMDATETIMEWMKEYDOWNA
LPNMDATETIMEFORMAT               equ LPNMDATETIMEFORMATA
LPNMDATETIMEFORMATQUERY          equ LPNMDATETIMEFORMATQUERYA
WC_PAGESCROLLER                  equ WC_PAGESCROLLERA


the right-hand side constants are not previously defined (nor are their W counterparts)

do you think it's a MS error or feature?  :lol:

Gunther
You have to know the facts before you can distort them.

dedndave

i think it's specific to masm32 windows.inc - not MS   :P

Hutch could probably just delete these lines
but - we'll see what he does

MichaelW

#4
Everything necessary to resolve those problems is in the CommCtrl.h distributed with the Windows Server 2003 SP1 PSDK that I have installed on my older system, and the same file (version 1.2) is apparently included with the Windows 7 SDK installed on my new system. The definition for each of the first four spans ~30 lines in the header file (two structures and some constants), but the last spans ~170 lines.
Well Microsoft, here's another nice mess you've gotten us into.

Gunther

Hi Michael,

Quote from: MichaelW on September 10, 2014, 09:45:36 AM
Everything necessary to resolve those problems is in the CommCtrl.h distributed with the Windows Server 2003 SP1 PSDK that I have installed on my older system, and the same file (version 1.2) is apparently included with the Windows 7 SDK installed on my new system. The definition for each of the first four spans ~30 lines in the header file (two structures and some constants), but the last spans ~170 lines.

I think it's a time question for Hutch. May be we get an update to download and install.

Gunther
You have to know the facts before you can distort them.

dedndave

obviously, it hasn't been a problem
the reason is - they are not really applicable in ASM programming
noone has used them, so it hasn't been an issue

the "LP" constants are types that could be TYPEDEF'ed as DWORD's or LPVOID's
i would probably use LPVOID anyplace they are needed
in ANSI or in UNICODE, a pointer is a pointer   :biggrin:

the WC_PAGESCROLLER constant is a system-defined window class
the constant is of little use in ASM - we need a null-terminated string

szPageScrollClass db 'SysPager',0

we could delete or comment the lines out, with little effect

Gunther

Dave,

Quote from: dedndave on September 11, 2014, 01:35:16 AM
we could delete or comment the lines out, with little effect

so why not. Make the changes and test it. Hutch would be quite certain about your help.

Gunther
You have to know the facts before you can distort them.

dedndave


Gunther

You have to know the facts before you can distort them.

TouEnMasm


Only cl is able to generate the needed code for those constants.
For example:
Quote
invoke function,LPNMDATETIMESTRING
is replace by:
lea eax,NMDATETIMESTRING
push eax
call _function
ML couldn't do that and those defines are totally useless with masm.


Fa is a musical note to play with CL

Gunther

Hi ToutEnMasm,

Quote from: ToutEnMasm on September 19, 2014, 06:14:51 PM
ML couldn't do that and those defines are totally useless with masm.

is that absolutely sure?

Gunther
You have to know the facts before you can distort them.

TouEnMasm


An interesting form is in the define prototypes.
example:     Myfunction proc  :ptr RECT

You win here an interesting information and the parameter get a dword size (pointer on the RECT structure).
It's the only case where he is of some use.

To use a function you can't avoid to read the msdn help,and here is the usefull information.
Fa is a musical note to play with CL