Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 1 - Resource Manager / Resource Manager Reference
Resource Manager Routines / Accessing Resource Entries in a Resource Map


RsrcMapEntry

To access the resource entries in a resource map in memory directly, you can use the RsrcMapEntry function.

FUNCTION RsrcMapEntry (theResource: Handle): LongInt;
theResource
A handle to a resource.
DESCRIPTION
Given a handle to a resource, RsrcMapEntry returns the offset of the specified resource's entry from the beginning of the resource map in memory. If it doesn't find
the resource entry, RsrcMapEntry returns 0, and the ResError function returns the result code resNotFound. If you pass a handle whose value is NIL, RsrcMapEntry returns arbitrary data, but ResError returns the result code noErr.

WARNING
Because the Resource Manager provides routines for opening, retrieving, and changing resources, there's usually no reason to access a resource map directly. To avoid damaging the file for which it's called, you should use RsrcMapEntry extremely carefully.
RESULT CODES
noErr0No error
resNotFound-192Resource not found
SEE ALSO
For an overview of the resource map, see "The Resource Map" beginning on page 1-7. For details of the structure of the resource map, see Figure 1-14 on page 1-115.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice