HGetState
HGetState Obtain the value of a relocatable block's tag byte
#include <Memory.h> Memory Manager
char HGetState( theHandle );
Handle theHandle ; handle of interest
returns the 8-bit tag-byte of theHandle
HGetState lets you examine or save the current value of a relocatable block's
master pointer tag byte. It includes the lock, purge, and resource attributes of
the block.
theHandle is a handle leading to a relocatable memory block.
Returns: a byte; the current tag settings for theHandle (as with all C char
return values, this is actually a 16-bit value, with the low 8 bits
significant). See HSetState for the bit layouts. The MemError
function may return an Error Code of:
noErr (0) No error
nilHandleErr (-109) theHandle has a NIL master pointer
memWZErr (-111) Illegal operation on a free block

Notes: Rather than manipulating the high byte (the tag byte) of a master pointer,
it is wise to use Memory Manager functions such as HLock and HPurge.