UpdateCtResource Update the specified resource record. Short Name UPDRES() Type Low-level file resource function Declaration COUNT UpdateCtResource(COUNT filno, pVOID resptr, VRLEN varlen) Description UpdateCtResource() updates a particular Resource in file filno. resptr points to a resource data block of length varlen. This block contains the following fields:
If a record lock has been placed on this resource by GetCtResource(), that lock is released by UpdateCtResource(). Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example struct { /* Resource Data Block structure */
ULONG resource_type; ULONG resource_number; TEXT variable_info[1016]; /* This will hold the Resource Name and Data */ } my_resource;
(VRLEN)sizeof(my_resource),(RES_NAME|RES_LOCK))) {
/*at this point you will update the information in the buffer*/ if (UpdateCtResource(datno, &my_resource, sizeof(my_resource)) printf("\nError %d when update resource.",uerr_cod);
else printf("\nUpdate successful!");
} else printf("\nCould not get resource. Error #%d",uerr_cod);
Limitations The recbyt parameter in this function is a 4-byte value capable of addressing at most 4 gigabytes. If your application supports HUGE files (greater than 4 gigabytes), you must use the ctSetHgh() and ctGetHgh() functions to set or get the high order 4 bytes of the file offset. See also GetCtResource(), AddCtResource(), DeleteCtResource() |
|||||||||||||||||||||||||||||||||