IItemPreviewerExt::SuggestBrowserPolicy method

Suggests the security policy to be applied to the browser.

Syntax

HRESULT SuggestBrowserPolicy(
  [in]          DWORD dwContext,
  [out, retval] DWORD *pdwFlags
);

Parameters

dwContext [in]

Type: DWORD

The context identifier for the operation. Override the dwContext default to set the context identifier to a value of your choosing.

pdwFlags [out, retval]

Type: DWORD*

A pointer to a DWORD value containing verification check flags. The BROWSERPOLICY_UNTRUSTED_CONTENT flag disables any possibility of the preview being able to run script or ActiveX. The parameter pdwFlags must not be a NULL pointer.

Return value

Type: HRESULT

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

Remarks

The IItemPreviewerExt interface is supported only on Windows XP and Windows Server 2003, and should no longer be used.

To preview attachments with a third-party protocol handler on computers running Windows XP or Windows Server 2003, it may be necessary to use the IItemPreviewerExt interface, and the following APIs: the ISearchProtocolUI, IItemPropertyBag and ISearchItem interfaces, the LINKINFO structure, and the LINKTYPE enumeration.

Using the BROWSERPOLICY_UNTRUSTED_CONTENT flag is strongly recommended to disable any possibility of the preview being able to run script or ActiveX. The IItemPreviewerExt::SuggestBrowserPolicy method can return information on whether the item being previewed is trusted or not. This will allow the previewer trident control to execute script, and even ActiveX controls. Because the previewer often uses temporary files to generate the preview, doing so can result in unexpected script and code execution in the Local Computer zone.

Requirements

Requirement Value
Minimum supported client
Windows XP with SP2 [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Redistributable
Windows Desktop Search (WDS) 3.0

See also

IItemPreviewerExt