ChangedResource
Handle rHandle ; handle of an existing resource attribute and pre- allocates disk space to store the changes to the resource file.
When the resource file is closed, the resource map for the file, as well as the data for the selected resource, will be written to disk.
rHandle is a resource handle. It is a handle obtained via GetResource, returns an operating system error code).
Notes: Use this if you expect to modify resource data or resource map information (i.e., resource ID and/or name) and wish those changes to be
change you wish to preserve. The effect of this call shows up on the next
call to one of:
It is particularly important to check the success of this operation by
calling ResError. For instance, if the resource can not be written to disk (e.g., if the disk is full), this is the only time you'll find out about it. If the
call fails, the resChanged attribute does not get set, so a call to
Note: This allocates additional disk space each time it is called. Calling it repeatedly will eventually cause a floppy disk to fill up.
Precautions must be taken if any resource in a file is purgeable (see
written to disk, then an empty resource is written to disk. Use HNoPurge and HPurge to ensure a resource remains in memory long enough to make a valid update. Note too, that DetachResource removes a resource from the resource map, and if that map gets written to disk, the resource data is destroyed.
The only valid way to clear the resChanged attribute of a resource is to