[RE: [Re: [lazarus] wndproc]]

Markku Niskanen markku.niskanen at laatumikro.fi
Mon Aug 23 16:36:43 EDT 1999


On Mon, 23 Aug 1999 12:19:59 +0100, you wrote:

>but if it is presented as an integer no-one will mess about without.  I also
>think that 16 bit windows handles were near pointers.

	You are correct to some point. Charles Petzold's classic
	"Programming Windows" tells us:

--- clip ---
	Here's one way Windows deals with moveable segments: You've
	seen how Windows and your programs use numbers called 
	"handles". In many cases, the handles are really near
	pointers. Windows maintains a segment called BURGERMASTER
	(no kidding) that contains a master handle-to-memory table. 	
	The handle points to a small area of memory within
	BURGERMASTER that contains the segment address of the item
	that the handle references. When Windows moves the segment
	that contains the item, it can adjust the address in
	BURGERMASTER without invalidating the handle. BURGERMASTER
	is itself a moveable segment.
--- clip ---

	So handles are really just a table of pointers that make it
	possible to manage the memory. Some of the segments are
	'moveable', some in addition 'discardable' and some are
	'fixed'. Well, this applies to Windows 2.0 and possibly some
	further versions as well, the book is dated 1988 :-)

Markku
-- 
markku.niskanen at laatumikro.fi






More information about the Lazarus mailing list