🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2529

Re: Use of STRICT def. in windows.h

#2529
From: John Grant
Date: Wed, 06 Jan 1993 22:16
32 lines
1417 bytes
In article <9301061117.PN20611@LL.MIT.EDU> khamsi@ll.mit.edu (Sarir Khamsi) writes:
>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.

	Look at what it is doing in the windows.h file.  You can
	see it all there.

	Basically, without STRICT, all of those HWND, HCURSOR, HPEN,
	etc handles are just UINTs, so the compiler can't detect
	an error like:
		PAINTSTRUCT ps;
		HDC hdc;
		HWND hwnd;
		hwnd=BeginPaint(hdc,&ps);
	when you actually wanted to do:
		hdc=BeginPaint(hwnd,&ps);

	With STRICT, each handle type is defined as a pointer to a
	dummy struct (a different one is defined for each type of
	handle).  Now the compiler can check all arguments which
	now appear as pointers to specific structs.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Technical Details
Message-ID: <1993Jan6.221607.28940@emr1.emr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!torn!nott!emr1!jagrant
References: <9301061117.PN20611@LL.MIT.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!torn!nott!emr1!jagrant
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Use of STRICT def. in windows.h
Message-ID: <1993Jan6.221607.28940@emr1.emr.ca>
Organization: Energy, Mines, and Resources, Ottawa
References: <9301061117.PN20611@LL.MIT.EDU>
Distribution: comp
Date: Wed, 6 Jan 1993 22:16:07 GMT
Lines: 32