CountTypes
CountTypes Get total number of resource types in open files
#include <Resources.h> Resource Manager
short CountTypes( );
returns number of resource types in all open resource files
CountTypes returns the total number of resource types in all
currently-opened resource files. It can be used as a first step in a
system-wide examination of resources.
Returns: a positive integer; it is the total number of distinct resource types
in all open resource files.

Notes: CountTypes is only needed by resource-management utilities such as
ResEdit or Resorcerer. This function is the first step in generating a list of
all the different resource types, thus making it possible to look up each
individual resource. Subsequent calls to GetIndType will return the
ResType value for types from 1 to the return value of this call.
This function operates across all open resource files while the similar
Count1Types function counts just the resource types in the current
resource file.
The following example displays a list of resource types along with the
number of such resources, contained in all open resource files.
Example
#include <Resources.h>
# include [TOKEN:12074] for printf() */
short rTotal, j;
char *rtp;
rTotal = CountTypes();
for ( j=1; j <= rTotal; j++ ) {
GetIndType( &rt, j );
rtp = &rt;
printf( "Type '%c%c%c%c' has %d resources\n",
rtp[0], rtp[1], rtp[2], rtp[3], CountResources( rt ) );
}