version 2003
PA_CountResourceKinds (resfile) long
| Parameter | Type | Description | |
| resfile | short | File reference number of the file to access | |
| Function result | long | Number of resource kinds |
Description
The routine PA_CountResourceKinds returns the number of kinds of resource that contains the file referenced by resFile.
This is usually used before a loop that gets an indexed access to the differents kinds.
If resFile is not a valid file reference number, the routine returns 0.
Example
Build a loop on resource kinds.
long countKinds, i;
unsigned long kind;
countKinds = PA_CountResourceKinds(resFile);
for(i = 1; i <= countKinds; i++)
{
kind = PA_GetIndexedResourceKind(resFile, i);
/* . . . do something with this kind . . . */
}
See Also
PA_CountResources, PA_GetResourceKindList.
Error Handling
Use PA_GetLastError to see if an error occurred