![]() |
GetMaxResourceSize |
||||
Header: | Resources.h | Carbon status: | Supported | |
Returns the approximate size of a resource.
SInt32 GetMaxResourceSize ( Handle theResource );
A handle to the resource whose size you wish to retrieve.
The approximate size, in bytes, of the resource. Unlike the GetResourceSizeOnDisk function, this function does not check the resource on disk; instead, it either checks the resource size in memory or, if the resource is not in memory, calculates its size on the basis of information in the resource map in memory. This gives you an approximate size for the resource that you can count on as the resources maximum size. Its possible that the resource is actually smaller than the offsets in the resource map indicate because the file has not yet been compacted. If you want the exact size of a resource on disk, either call GetResourceSizeOnDisk or call the UpdateResFile function before calling GetMaxResourceSize. If the handle isnt a handle to a valid resource, the function returns 1, and the ResError function returns the result code resNotFound.0
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)