Επεξεργασία

Κοινή χρήση μέσω


IAttachmentExecute::SetLocalPath method (shobjidl_core.h)

Sets and stores the path to the file.

Syntax

HRESULT SetLocalPath(
  [in] LPCWSTR pszLocalPath
);

Parameters

[in] pszLocalPath

Type: LPCWSTR

A pointer to a string that contains the local path where the attachment file is to be stored.

Return value

Type: HRESULT

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

Remarks

Calling IAttachmentExecute::SetLocalPath is required.

When the attachment is approved for execution by the user (either through policy or prompt), the path specified by this method is used. If only IAttachmentExecute::SetFileName was called before calling IAttachmentExecute::CheckPolicy and IAttachmentExecute::Prompt, that trust could be revoked if the assumed local path was different from that set by IAttachmentExecute::SetLocalPath. Trust can be granted by various Zone APIs, antivirus services, file type information, policies as well as other system trust providers.

IAttachmentExecute::SetLocalPath must be called before calling IAttachmentExecute::Execute.

Requirements

Requirement Value
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)

See also

IAttachmentExecute

IAttachmentExecute::SetFileName