PA_SetResource

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

version 2003


PA_SetResource (resfile; kind; resID; newData; dataSize)

ParameterTypeDescription
resfileshortFile reference number of the file to access
kindunsigned longKind (4 Bytes type) of resource to access
resIDshortUnique resource ID
newDatachar*New content of the resource
dataSizelongSize of the resource data in bytes

Description

The routine PA_SetResource changes the content of the resource of type kind and the ID resID (in the file resFile) to the new data pointed to by newData of size dataSize.

Pass the file reference number of the file that holds the resource in resFile.

Pass the 4-Bytes type code of the resource (such as 'PICT', 'TEXT', or anything you need) in kind and its unique ID in the file in resID.

Pass a pointer to the block of memory that holds the new data of the resource in newData, and the size of this data in bytes in dataSize.

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").

See Also

No reference.

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