CountResources
returns total rType resources in all open resource files
CountResources returns the number of resources of a specified resource type that exist among the currently-open resource files.
rType is a 4-byte ResType value identifying the resource type you wish to count (e.g. 'FONT', 'MENU', etc.).
Returns: a positive integer; the number of resources of the specified type contained in all currently-open resource files. Returns 0 if none are
found.
Notes: This function is used as the first step in generating a list of
currently-available resources of a particular type. To generate the list,
resources in the current resource file.
The following example prints a list of the names of all resources of type
'DRVR' (i.e., desk accessories).
Example
#include <Resources.h>
short rCount, rID, j;
printf("\n"); [TOKEN:12074] ensure printf can get fonts */
for( j=1; j <= rCount; j++ ) {
printf(" 'DRVR' Rsrc ID: %6d, Name: %s\n", rID, PtoCstr(rName)+1);
}