IPreviewHandler::Unload method (shobjidl_core.h)

Directs the preview handler to cease rendering a preview and to release all resources that have been allocated based on the item passed in during the initialization.

Syntax

HRESULT Unload();

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When called, the preview window will be destroyed.

This method should be called only after IInitializeWithItem::Initialize, IInitializeWithStream::Initialize, or IInitializeWithFile::Initialize has been called. All resources associated with this initialization will be released. Prior to calling IPreviewHandler::DoPreview, this preview handler will be re-initialized with a call to one of the initialization interfaces and a call to IPreviewHandler::SetWindow.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
Redistributable Windows Search 4 or later