共用方式為


IPersistMessage::HandsOffMessage

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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