GetIndResource
GetIndResource Get a handle to a resource, given its index
#include <Resources.h> Resource Manager
Handle GetIndResource(rType, index );
ResType rType ; 4-byte ResType; resource type to get
short index ; range: 1 to CountResources(...);
returns handle leading to the resource data
Given a resource type and a resource index (an arbitrary value assigned by
the Resource Manager), GetIndResource reads the resource into memory
and returns a handle for subsequent access.
rType is a 4-byte ResType value. It identifies the resource type you want
read into memory (e.g., 'FONT', 'WIND', etc.)
index is a positive value greater than or equal to 1. It is a simple index
into an arbitrarily-ordered list of resources maintained by the
Resource Manager. The highest valid value for index can be
obtained via CountResources.
Returns: a handle leading to a resource of type rType . If the return value is
NIL, then an error occurred. Call ResError to find out what
happened.

Notes: This function is most often used by resource-management utilities. By
calling this repeatedly over the entire range of index, you can obtain
handles to all resources of type rType. If you want to access resources in a
particular resource file, make that file current (see UseResFile), then
call Count1Resources and Get1IndResource.
Use CountResources(rType ) to determine the valid range for index. See
that topic for an example of usage.
Note that the UseResFile function and the concept of the " current
resource file" is not relevant to these functions. GetIndResource accesses
the Resource Manager's internal resource list in which resource IDs are
maintained in an arbitrary order. Use GetResource, Get1Resource, or
any of the manager-specific GetXxx functions (e.g., GetMenu,
GetCursor, etc.) for normal access to resources. Use ReleaseResource
to free up whatever memory was used.
You may wish to surround this call with SetResLoad(FALSE) and
SetResLoad(TRUE). In that case, the resource data is NOT read into
memory, and the return value is an empty handle (* theHandle is NIL). The
resource name attributes and other data are available for inspection.