|
![]() |
![]() |
version 2003
PA_SetResource (resfile; kind; resID; newData; dataSize)
Parameter | Type | Description | |
resfile | short | → | File reference number of the file to access |
kind | unsigned long | → | Kind (4 Bytes type) of resource to access |
resID | short | → | Unique resource ID |
newData | char* | → | New content of the resource |
dataSize | long | → | Size 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