antognini@us.ibm.com said:
Sorry, I disagree with your assertion that only a pointer variable
should hold a pointer. I am continually doing pointer arithmetic, and
I have to cast a pointer into what works, typically a ULONG.
Why? Arithmetic on pointers is well defined in C.
And if you argue that you want per-byte resolution, then cast your
pointer into an ``unsigned char*‘’ instead of an unsigned long. There
are types available within the language to portably to what you want.
antognini@us.ibm.com said:
Interestingly, the macro CONTAINING_RECORD64 does arithmetic on
ULONGLONG, which is not a pointer type. You may say Microsoft ought to
have defined a ULONGLONG_PTR type to kept things pure, but I feel
doing so or not doing so is a matter of taste.
Perhaps I’m letting my bias show here, but I can’t imagine using MS
code as a model of good programming style. At least not the examples
available to us outsiders.
Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com