Important: The information in this document is obsolete and should not be used for new development.
PBAllocate
You can use thePBAllocate
function 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.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. --> ioRefNum
Integer
A file reference number. --> ioReqCount
LongInt
The number of bytes requested. <-- ioActCount
LongInt
The number of bytes actually allocated, rounded up to the nearest multiple of the allocation block size. DESCRIPTION
ThePBAllocate
function addsioReqCount
bytes 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,PBAllocate
allocates the rest of the space on the volume and returnsdskFulErr
as its function result.
- Note
- If the total number of requested bytes is unavailable,
PBAllocate
allocates whatever space, contiguous or not, is available. To force the allocation of the entire requested space as a contiguous piece, callPBAllocContig
instead.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBAllocate
is_Allocate
.RESULT CODES