home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!ekcolor!dj
- From: dj@ekcolor.ssd.kodak.com (Dave Jones)
- Subject: Re: Use of STRICT def. in windows.h
- Message-ID: <1993Jan6.190526.22736@pixel.kodak.com>
- Sender: news@pixel.kodak.com
- Organization: Vonnegut Tent Rentals, Inc.
- X-Newsreader: TIN [version 1.1 PL7]
- References: <9301061117.PN20611@LL.MIT.EDU>
- Distribution: comp
- Date: Wed, 6 Jan 93 19:05:26 GMT
- Lines: 29
-
- Sarir Khamsi (khamsi@ll.mit.edu) wrote:
- > Yo,
- >
- > Does anyone know where I can find information on what the meaning of
- > the
- >
- > #ifdef STRICT
- >
- > statements in the windows.h file is? Does this have anything to do w/
- > NT, backward compatibility or what? Thanks in advance.
- >
- Its a way of forcing type checking in types that are different in name but
- not in fact. For instance a HPALETTE is a HANDLE which is a WORD.
- Therefore you can pass a HPALETTE to a WORD parameter, or any other
- compatible pseudo-type (pseudo- because the normal definition of HPALETTE
- is just via #define HPALETTE HANDLE or some such).
-
- When STRICT is in force the type definitions are carefully crafted to
- generate compiler errors if you use the names in the wrong places. This
- is done usually by something like:
-
- #define HPALETTE struct tagHP {uint unused}
-
- Look in any of the .h files for examples like this.
-
- --
- ||------------------------------------------------------------------------
- ||Dave Jones (dj@ekcolor.ssd.kodak.com)|Eastman Kodak Co. Rochester, NY |
-
-