IAttachmentExecute::SetReferrer method

Sets the security zone associated with the attachment file based on the referring file.

Syntax

HRESULT SetReferrer(
  LPCWSTR pszReferrer
);

Parameters

pszReferrer

Type: LPCWSTR

A pointer to a string containing the path of the referring file.

Return Value

Type: HRESULT

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

Remarks

IAttachmentExecute::SetReferrer and IAttachmentExecute::SetSource have similar functionality. If both are set, the least-trusted zone of the two is used.

IAttachmentExecute::SetReferrer is used by container files to indicate indirect inheritance and avoid zone elevation. It can also be used with shortcut files to limit elevation based on parameters.

Calling IAttachmentExecute::SetReferrer is optional.

IAttachmentExecute::SetReferrer is only used to determine the security zone and its associated policies.

Requirements

   
Minimum supported client Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shdocvw.dll (version 6.0 or later)