Important: The information in this document is obsolete and should not be used for new development.
PBGetFPos
You can use thePBGetFPos
function 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.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. --> ioRefNum
Integer
A file reference number. <-- ioReqCount
LongInt
On output, set to 0. <-- ioActCount
LongInt
On output, set to 0. <-- ioPosMode
Integer
On output, set to 0. <-- ioPosOffset
LongInt
The current position of the mark. DESCRIPTION
ThePBGetFPos
function returns, in theioPosOffset
field, the mark of the specified file. The value returned inioPosOffset
is zero-based. Thus, a call toPBGetFPos
returns 0 if you call it when the file mark is positioned at the beginning of the file.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBGetFPos
is_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