PA_GetIndexedResourceKind

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_GetIndexedResourceKind (resfile; index) unsigned long

ParameterTypeDescription
resfileshortFile reference number of the file to access
indexshortxTh kind of resource in the file
Function resultunsigned longResource kind

Description

The routine PA_GetIndexedResourceKind returns the indexTh 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


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next