PA_SetResourceName


version 2003


PA_SetResourceName (resFile; kind; resID; newName)

Parameter Type Description
resFile short → File reference number of the file to access
kind unsigned long → Kind (4 Bytes type) of resource to acces
resID short → Unique resource ID
newName char* → New name of the resource

Description

The routine PA_SetResourceName changes the name of the resource of type kind and the unique ID resID in the file referenced by resFile to newName .

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

If the resource does not exist or if resFile is an invalid file reference number, the routine does nothing, and PA_GetLastError returns -5 ("Resource not found").

Example

Changing the name of resource 'toto' ID 128.

   PA_SetResourceName(resFile, 'toto', 128, "\pThe toto resource"); // using Pascal strings under MacOS 

See Also

PA_GetResourceName , PA_GetResourceNameList .

Error Handling

Use PA_GetLastError to see if an error occurred