![]() |
GetResourceSizeOnDisk |
||||
Header: | Resources.h | Carbon status: | Supported | |
Returns the exact size of a resource.
SInt32 GetResourceSizeOnDisk ( Handle theResource );
A handle to the resource whose size you wish to retrieve.
The exact size, in bytes, of the resource. If the handle isnt a handle to a valid resource, the function returns 1, and the ResError function returns the result code resNotFound.
This function checks the resource on disk, not in memory. You can call this function before reading a resource into memory to make sure theres enough memory available to do so successfully.
The GetResourceSizeOnDisk function is also available as the SizeResource function.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. (Last Updated 5/8/2000)