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