
The preview is displayed in the reading pane through a call to IPreviewHandler::DoPreview.At this point, the handler should do nothing more until IPreviewHandler::DoPreview is called.The view window is passed from the host to the handler through IPreviewHandler::SetWindow.The preview handler is initialized, preferably with a stream.
#What is outlook preview for windows xp windows#
The host can be thought of as Windows Explorer in Windows Vista or Outlook 2007. The data flow in the preview process follows the general path shown here. For optimal efficiency, that sort of processing should not be done until the preview is called for. In general, initialization should not do any heavy work such as composing and storing a preview image. Do not read data from these sources until IPreviewHandler::DoPreview is called. If you must initialize with a file or Shell item, store the file path or a reference to the IShellItem. Initialization through a stream ensures file integrity and the stability benefits to the system of running the handler as a low IL process, such as protecting the system from buffer overruns, limiting where a handler can write information, and limiting communication with other windows. You can initialize through a file or item if necessary, but streams provide the most secure way to implement a handler. InitializationĪs with thumbnail and property handlers, it is strongly recommended that you initialize your handler with a stream. Two instances of Prevhost.exe can be running simultaneously one for handlers running as low IL processes, one for handlers that have opted out of that behavior. HKEY_CLASSES_ROOTĭifferent preview handlers share the same process by default. Systems could eventually be configured to reject any process that is not low IL. You can optionally disable running as a low IL process by setting the following value in the registry. More importantly, implementation as an in-process server provides greater control over the lifetime of the handler object, which allows for better cleanup and efficiency.īy default, preview handlers run in a low integrity level (IL) process for security reasons. First, implementation of an in-process server is easier. This is not recommended for several reasons. A preview handler can be built as a local Component Object Model (COM) server.However, these same handlers will work in Windows Explorer and Outlook 2007 running on Windows Vista. Preview handlers built by this method are not compatible with Outlook 2007 on Windows XP. The system provides a surrogate host for this in the Prevhost.exe file. A preview handler can be built as an in-process server but run through an out-of-process surrogate host.There are two methods of implementing this: Preview handlers always run out of process. Your handler is called through its IObjectWithSite, which returns an IUnknown pointer through which you request an IPreviewHandlerFrame object to interact with the host. The preview handler itself implements these interfaces: Hosts implement IPreviewHandlerFrame as a method of communication between the preview handler and the host. Hosts include the Windows Explorer in Windows Vista or Microsoft Outlook 2007. Providing Your Own Process for a Preview HandlerĪ preview handler is a hosted application.This topic discusses the following topics: This is done without launching the file's associated application. Preview handlers are called when an item is selected to show a lightweight, rich, read-only preview of the file's contents in the view's reading pane.
