Important: The information in this document is obsolete and should not be used for new development.
PBAllocate
You can use thePBAllocatefunction to allocate additional blocks to an open file.
FUNCTION PBAllocate (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock- A pointer to a basic File Manager parameter block.
async- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioRefNumIntegerA file reference number. --> ioReqCountLongIntThe number of bytes requested. <-- ioActCountLongIntThe number of bytes actually allocated, rounded up to the nearest multiple of the allocation block size. DESCRIPTION
ThePBAllocatefunction addsioReqCountbytes to the specified file and sets the physical end-of-file to 1 byte beyond the last block allocated. If there isn't enough empty space on the volume to satisfy the allocation request,PBAllocateallocates the rest of the space on the volume and returnsdskFulErras its function result.
- Note
- If the total number of requested bytes is unavailable,
PBAllocateallocates whatever space, contiguous or not, is available. To force the allocation of the entire requested space as a contiguous piece, callPBAllocContiginstead.![]()
ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBAllocateis_Allocate.RESULT CODES