Important: The information in this document is obsolete and should not be used for new development.
PBHOpenRF
You can use thePBHOpenRFfunction to open the resource fork of file.
FUNCTION PBHOpenRF (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock- A pointer to a basic HFS 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. --> ioNamePtrStringPtrA pointer to a pathname. --> ioVRefNumIntegerA volume specification. <-- ioRefNumIntegerA file reference number. --> ioPermssnSignedByteThe read/write permission. --> ioDirIDLongIntA directory ID. DESCRIPTION
ThePBHOpenRFfunction creates an access path to the resource fork of a file and returns a file reference number in theioRefNumfield.SPECIAL CONSIDERATIONS
Generally your application should use Resource Manager routines rather than File Manager routines to access a file's resource fork. ThePBHOpenRFfunction does not read the resource map into memory and is generally useful only for applications (such as utilities that copy files) that need block-level access to a resource fork. In particular, you should not use the resource fork of a file to hold nonresource data. Many parts of the system software assume that a resource fork always contains resource data.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBHOpenRFis_HOpenRF.RESULT CODES