PA_GetIndexedResourceKind


version 2003


PA_GetIndexedResourceKind (resfile; index) → unsigned long

Parameter Type Description
resfile short File reference number of the file to access
index short xTh kind of resource in the file
Function result unsigned long Resource kind

Description

The routine PA_GetIndexedResourceKind returns the index Th kind of resource in the file referenced by resFile .

index

is a positive value in the range 1 to the number of kinds. Note that the order is kept by the Internal Resource Manager and is arbitrary. It is not the order of creation of the kinds of resources

If index is out of index , the routines returns '????'.

Example

Loop on all kinds in a file.

   unsigned long   kind;
   long         i, j, count;
   
   i = 1;
   do {
      kind = PA_GetIndexedResourceKind(resFile, i++);
      if(kind != '????')
      {
         countRes= PA_CountResources(resFile, kind);
         for(j = 0; j < count; j++)
         {
            /* PA_GetIndexedResource(resFile, kind, j);
         }
      }
   } while (kind != '????');

See Also

PA_GetResourceKindList .

Error Handling

Use PA_GetLastError to see if an error occurred