IPreviewHandler::DoPreview method

Directs the preview handler to load data from the source specified in an earlier Initialize method call, and to begin rendering to the previewer window.

Syntax

HRESULT DoPreview(

);

Parameters

This method has no parameters.

Return Value

Type: HRESULT

This method can return one of these values.

Return code Description
S_OK
The operation completed successfully.
E_PREVIEWHANDLER_DRM_FAIL
Blocked by digital rights management.
E_PREVIEWHANDLER_NOAUTH
Blocked by file permissions.
E_PREVIEWHANDLER_NOTFOUND
Item was not found.
E_PREVIEWHANDLER_CORRUPT
Item was corrupt.

Remarks

If the previewer window has not yet been created, then it must be created after this method has been called. The preview handler is responsible for painting the area specified in IPreviewHandler::SetWindow or IPreviewHandler::SetRect. If these methods are called while the preview handler is rendering, the window must be reparented/resized without stopping or restarting the rendering of the item.

This method should be called only after IPreviewHandler::SetWindow has been called.

Aditionally, this method should be called only after Initialize, Initialize, or Initialize has been called.

Note  Do not actually create the previewer window until this method has been called.
 

Requirements

   
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