Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 1 - Resource Manager / Resource Manager Reference
Resource Manager Routines / Getting and Setting Resource Information


GetResInfo

You can use the GetResInfo procedure to get a resource's resource ID, resource type, and resource name.

PROCEDURE GetResInfo (theResource: Handle; VAR theID: Integer; 
                      VAR theType: ResType; VAR name: Str255);
theResource
A handle to a resource.
theID
GetResInfo returns the resource ID of the specified resource in this parameter.
theType
GetResInfo returns the resource type of the specified resource in this parameter.
name
GetResInfo returns the name of the specified resource in this parameter.
DESCRIPTION
Given a handle to a resource, the GetResInfo procedure returns the resource's resource ID, resource type, and resource name. If the handle isn't a valid handle to
a resource, GetResInfo does nothing; to determine whether this has occurred, call ResError.

RESULT CODES
noErr0No error
resNotFound-192Resource not found
SEE ALSO
To check for errors, call the ResError function as described on page 1-47.

To set a resource's ID, resource type, or resource name, use the SetResInfo procedure. It is described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996