PA_SetResourceName

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

version 2003


PA_SetResourceName (resFile; kind; resID; newName)

ParameterTypeDescription
resFileshortFile reference number of the file to access
kindunsigned longKind (4 Bytes type) of resource to acces
resIDshortUnique resource ID
newNamechar*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


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