PA_RemoveResourceByName


version 2003


PA_RemoveResourceByName (resfile; kind; resName)

Parameter Type Description
resfile short File reference number of the file to access
kind unsigned long Kind (4 Bytes type) of resource to access
resName char* Name of resource to delete

Description

The routine PA_RemoveResourceByName removes the resource name resName of type kind from the file referenced by resFile .

If the resource does not exist or if resFile is an invalid file reference number, the routine does nothing and sets PA_GetLastError to -3.

If more than one resource in the file has the name resName , the routine removes the first one it finds. Note that the removed resource is not necessarily the oldest.

Depending on default settings or on previous calls to PA_UsePStrings or PA_UseCStrings , resName will be a Pascal or an ANSI C string.

Example

Remove personal resource named "MySuperResource".

   #define kMyResourceKind   'PERS'
   /* . . . */
   PA_RemoveResourceByID(resFile, kMyResourceKind, "MySuperResource");

See Also

PA_RemoveResourceByID .

Error Handling

Use PA_GetLastError to see if an error occurred