The following steps are required to update a resource:
An existing resource can be updated by calling the following CTResource method:
void Update(pVOID data, VRLEN size);
The Resource data is any collection of data that you wish to store as a Resource. It can be a character string, a structure, or any variable type. size indicate the number of bytes occupied by data.
Example
void UpdateMyResource(const CTTable& hTable, ULONG type, ULONG number, pVOID data, VRLEN size)
{
CTResource* hRes = new CTResource(hTable, type, number);
try
{
hRes->Update(data, size);
}
catch (CTException &err)
{
printf("Error %d - %s\n", err.GetErrorCode(), err.GetErrorMsg());
}
delete hRes;
}