HSetState
You can use the HSetState procedure to restore properties of a block after a call to HGetState.
PROCEDURE HSetState (h: Handle; flags: SignedByte);
h
- A handle to a relocatable block.
flags
- A signed byte specifying the properties to which you want to set the relocatable block.
DESCRIPTION
The HSetState procedure restores to the handle h the properties specified in the flags signed byte. See the description of the HGetState function for a list of the currently used bits in that byte. Because additional bits of the flags byte could become significant in future versions of system software, use HSetState only with a byte returned by HGetState. If you need to set two or three properties of a relocatable block at once, it is better to use the procedures that set individual properties than to manipulate the bits returned by HGetState and then call HSetState.
ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for HSetState are
| Registers on entry |
| A0 | Handle whose properties you want to set |
| D0 | Byte containing flags indicating the handle's new properties |
| Registers on exit |
| D0 | Result code |
RESULT CODES
| noErr | 0 | No error |
| nilHandleErr | -109 | NIL master pointer |
| memWZErr | -111 | Attempt to operate on a free block |