Export (0) Print
Expand All

IPreviewHandler interface

Exposes methods for the display of rich previews.

Members

The IPreviewHandler interface inherits from the IUnknown interface. IPreviewHandler also has these types of members:

Methods

The IPreviewHandler interface has these methods.

MethodDescription
DoPreview

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.

QueryFocus

Directs the preview handler to return the HWND from calling the GetFocus Function.

SetFocus

Directs the preview handler to set focus to itself.

SetRect

Directs the preview handler to change the area within the parent hwnd that it draws into.

SetWindow

Sets the parent window of the previewer window, as well as the area within the parent to be used for the previewer window.

TranslateAccelerator

Directs the preview handler to handle a keystroke passed up from the message pump of the process in which the preview handler is running.

Unload

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.

 

Remarks

Preview handlers can be built in managed code. Typically, all preview handlers are hosted together in a surrogate process called prevhost.exe. There is one instance of this process for preview handlers running at normal integrity level, and another instance for preview handlers running at low integrity level. If you want to implement your handler in managed code, your handler should not run inside either of these shared processes. Instead, arrange for your handler to get a new instance of prevhost.exe by creating a new AppID entry in the registry (specifying prevhost.exe as the DllSurrogate value) and then setting that as the AppID value in the registry value for your handler's class ID. This will ensure that a unique prevhost.exe instance is created for your handler, instead of the common instances used by the other handlers.

Requirements

Minimum supported client

Windows Vista, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Redistributable

Windows Search 4 or later

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft