Important: The information in this document is obsolete and should not be used for new development.
LoadResource
You can use theLoadResourceprocedure to get resource data after you've calledSetResLoadwith theloadparameter set toFALSEor when the resource is purgeable.
PROCEDURE LoadResource (theResource: Handle);
theResource- A handle to a resource.
DESCRIPTION
Given a handle to a resource,LoadResourcereads the resource data into memory. If the resource is already in memory, or if thetheResourceparameter doesn't contain a handle to a resource, thenLoadResourcedoes nothing. To determine whether either of these situations occurred, callResError. If the resource is already in memory,ResErrorreturnsnoErr; if the handle is not a handle to a resource,ResErrorreturnsresNotFound.SPECIAL CONSIDERATIONS
If you've changed the resource data for a purgeable resource and the resource is purged before being written to the file, the changes will be lost. In this case,LoadResourcerereads the original resource from the file's resource fork. You should useChangedResourceorSetResPurgebefore callingLoadResourceto ensure that changes made to purgeable resources are written to the resource fork.ASSEMBLY-LANGUAGE INFORMATION
TheLoadResourceprocedure preserves all registers.RESULT CODES
noErr 0 No error resNotFound -192 Resource not found SEE ALSO
To check for errors, call theResErrorfunction as described on page 1-47.For information about the
SetResLoad,ChangedResource, andSetResPurgeprocedures, see page 1-74, page 1-83, and page 1-89, respectively.