m_set_far_block
This call expands, shrinks, or frees a previously-allocated indirect far pointer memory block. The corresponding handle entry is passed along with the new desired size in bytes.
- Syntax: int m_set_far_block(char far **target_block,unsigned long target_size)
- Parameters: char far **target_block - Near pointer to far pointer to block
unsigned long target_size - New size (in bytes) for the memory block
If the block size is set to zero, the
corresponding far* table entry is cleared.
- Returns: New block size
If return value = 0, then not enough memory exists
ERROR_TABLE_NOT_REGISTERED - Table not registered
ERROR_TABLE_ENTRY_RANGE - Range error
ERROR_INSUFFICIENT_MEMORY - insufficient memory
ERROR_TABLE_FULL - No room in far table
- Related Calls: m_get_far_block
- Comments: To free up all memory allocated for this block, set the target_size
field to zero. Freeing up the block will make the handle available
for re-use. See the example under "m_get_far_block".