PA_RemoveResourceByName

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

version 2003


PA_RemoveResourceByName (resfile; kind; resName)

ParameterTypeDescription
resfileshortFile reference number of the file to access
kindunsigned longKind (4 Bytes type) of resource to access
resNamechar*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


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