CD> Depending on Action, MoreInformation could be an integer value, or
CD> it could be a pointer to one or more types of structures. So then,
CD> if MoreInformation was the address of a character string,...
Got it and thanx.
Today I saw an interesting expression like I had never seen before.
In a call to SendMessage, the variable that's sent as the LPARAM is (I
guess) supposed to be a long. The original programmer wanted to send a
FAR pointer to a CSTRING (while compiling the whole shebang in the
medium modle) so what he did was a double cast (or at least that's what
I took it to be):
(long)(LPSTR)foovar...
We are now compiling everything in the large modle so I was advised to
change the above to:
(LPARAM)foovar...
My question is this: was I correct in assuming that the first example
above is a double cast? If so, are double casts common elsewhere?
In any case wouldn't the LPSTR cast have done the trick or is the
second cast to long necessary to change the segment:offset notation for
the 16-bit environment to something a bit more flat?
* KWQ/2 1.2i *
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)
|