Executes an action on an attachment.
HRESULT Execute( HWND hwnd, LPCWSTR pszVerb, HANDLE *phProcess );
The handle of the parent window.
A pointer to a null-terminated string that contains a verb specifying the action to be performed on the file. See the lpOperation parameter in ShellExecute for valid strings. This value can be NULL.
A pointer to a handle to the source process, used for synchronous operation. This value can be NULL.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Before calling IAttachmentExecute::Execute, IAttachmentExecute::SetLocalPath must be called with a valid local path and the file must be copied to that location.
IAttachmentExecute::Execute may run virus scanners or other trust services to validate the file before executing it. Note that these services can delete or alter the file.
IAttachmentExecute::Execute may attach evidence to the local path in its NTFS alternate data stream (ADS).
If phProcess is not NULL, IAttachmentExecute::Execute operates as a synchronous process and returns an HPROCESS, if available. If phProcess is NULL, IAttachmentExecute::Execute operates as an asynchronous process. This implies that the calling application has a message pump and a long-lived window.
If the handle pointed to by phProcess is non-NULL when the method returns, the calling application is responsible for calling CloseHandle to free the handle when it is no longer needed.
|Minimum supported client||Windows XP with SP2 [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|
|DLL||Shdocvw.dll (version 6.0 or later)|