PA_CountResourceKinds

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

version 2003


PA_CountResourceKinds (resfile) long

ParameterTypeDescription
resfileshortFile reference number of the file to access
Function resultlongNumber 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


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