Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 4.27 KB

nf-objidl-ipersiststorage-handsoffstorage.md

File metadata and controls

80 lines (61 loc) · 4.27 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:objidl.IPersistStorage.HandsOffStorage
IPersistStorage::HandsOffStorage (objidl.h)
Instructs the object to release all storage objects that have been passed to it by its container and to enter HandsOff mode.
HandsOffStorage
HandsOffStorage method [COM]
HandsOffStorage method [COM]
IPersistStorage interface
IPersistStorage interface [COM]
HandsOffStorage method
IPersistStorage.HandsOffStorage
IPersistStorage::HandsOffStorage
_com_ipersiststorage_handsoffstorage
com.ipersiststorage_handsoffstorage
objidl/IPersistStorage::HandsOffStorage
com\ipersiststorage_handsoffstorage.htm
com
1e5ef26f-d8e7-4fa6-bfc4-19dace35314d
12/05/2018
HandsOffStorage, HandsOffStorage method [COM], HandsOffStorage method [COM],IPersistStorage interface, IPersistStorage interface [COM],HandsOffStorage method, IPersistStorage.HandsOffStorage, IPersistStorage::HandsOffStorage, _com_ipersiststorage_handsoffstorage, com.ipersiststorage_handsoffstorage, objidl/IPersistStorage::HandsOffStorage
objidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
ObjIdl.idl
Windows
19H1
IPersistStorage::HandsOffStorage
objidl/IPersistStorage::HandsOffStorage
c++
APIRef
kbSyntax
COM
ObjIdl.h
IPersistStorage.HandsOffStorage

IPersistStorage::HandsOffStorage

-description

Instructs the object to release all storage objects that have been passed to it by its container and to enter HandsOff mode.

-returns

This method returns S_OK to indicate that the object has entered HandsOff mode successfully.

-remarks

This method causes an object to release any storage objects that it is holding and to enter the HandsOff mode until a subsequent IPersistStorage::SaveCompleted call. In HandsOff mode, the object cannot do anything and the only operation that works is a close operation.

A container application typically calls this method during a full save or low-memory full save operation to force the object to release all pointers to its current storage. In these scenarios, the HandsOffStorage call comes after a call to either OleSave or IPersistStorage::Save, putting the object in HandsOffAfterSave mode. Calling this method is necessary so the container application can delete the current file as part of a full save, or so it can call the IRootStorage::SwitchToFile method as part of a low-memory save.

A container application also calls this method when an object is in Normal mode to put the object in HandsOffFromNormal mode.

While the component object is in either HandsOffAfterSave or HandsOffFromNormal mode, most operations on the object will fail. Thus, the container should restore the object to Normal mode as soon as possible. The container application does this by calling the IPersistStorage::SaveCompleted method, which passes a storage pointer back to the component object for the new storage object.

Notes to Implementers

This method must release all pointers to the current storage object, including pointers to any nested streams and storages. If the object contains nested objects, the container application must recursively call this method for any nested objects that are loaded or running.

-see-also

IPersistStorage

OleSave