DetachResource
DetachResource Prevent resource from being discarded when file is closed
#include <Resources.h> Resource Manager
void DetachResource(rHandle );
Handle rHandle ; existing, valid handle to a resource
DetachResource removes a resource handle from the resource map
without releasing it from memory. This can be used to keep one or more
resources in memory after closing a resource file.
rHandle is a handle leading to some variable length resource data. This
should be a valid handle obtained via GetResource,
Returns: none (if rHandle is not a handle to a resource, or if detachment is
disallowed, ResError will return an error).

Notes: DetachResource causes rHandle 's resource map pointer to be set to
NIL while maintaining the resource in memory and keeping the handle's
master pointer valid. One significant effect is that when a resource's file is
closed (see CloseResFile), the resource data is not purged from memory.
After this call, rHandle is no longer considered to be a resource handle.
Calls such as ReleaseResource and GetResInfo will not respond. If you
call GetResource (et. al.) for the same handle, the resource will be read
into memory again. You can copy the detached resource and install the
duplicate into the resource list via AddResource. To discard the detached
resource data, use DisposHandle.
This function is not valid for resources tagged with the resChanged
attribute (ResError returns resAttrErr).