IPersistMessage::HandsOffMessage

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Causes the form to release its current message.

HRESULT HandsOffMessage( void );

Parameters

None

Return Value

  • S_OK
    The message was successfully released.

Remarks

Forms transition into two HandsOff states:

When a form is in either of these states, it is in the process of being stored permanently.

Notes to Implementers

When a form viewer calls the IPersistMessage::HandsOffMessage method while your form is in the Normal or NoScribble state, recursively call HandsOffMessage on each message embedded in the current message and the IPersistStorage::HandsOffStorage method on each OLE object embedded in the current message. Then release the current message and all embedded messages and OLE objects. If your form was in the Normal state, transition to the HandsOffFromNormal state. If your form was in the NoScribble state, transition to the HandsOffAfterSave state. After a successful transition, call the message's IUnknown::Release method and return S_OK.

When a form viewer calls HandsOffMessage while your form is in either of the HandsOff states, return E_UNEXPECTED.

For more information about the different states of a form, see Form States. For more information about how to work with the HandsOff state of storage objects, see the IPersistStorage::HandsOffStorage method.

See Also

Reference

IPersistMessage : IUnknown

Concepts

Form States