Important: The information in this document is obsolete and should not be used for new development.
PBGetFPos
You can use thePBGetFPosfunction to determine the current position of the file mark before reading from or writing to an open file.
FUNCTION PBGetFPos (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. <-- ioReqCountLongIntOn output, set to 0. <-- ioActCountLongIntOn output, set to 0. <-- ioPosModeIntegerOn output, set to 0. <-- ioPosOffsetLongIntThe current position of the mark. DESCRIPTION
ThePBGetFPosfunction returns, in theioPosOffsetfield, the mark of the specified file. The value returned inioPosOffsetis zero-based. Thus, a call toPBGetFPosreturns 0 if you call it when the file mark is positioned at the beginning of the file.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBGetFPosis_GetFPos.RESULT CODES
noErr 0 No error ioErr -36 I/O error fnOpnErr -38 File not open rfNumErr -51 Bad reference number gfpErr -52 Error during PBGetFPos