CSharedFile::Detach
Call this function to close the memory file and detach it from the memory block.
HGLOBAL Detach( );
Return Value
The handle of the memory block that contains the contents of the memory file.
Remarks
You can reopen it by calling SetHandle, using the handle returned by Detach.
Requirements
Header: afxadv.h