Directs Internet Explorer to download a file.
typedef HRESULT STDAPICALLTYPE TRIGGERFILEDOWNLOADFN ( LPCWSTR lpszURL );
- [in] A pointer to the URL of the file to download.
Returns one of the following values.
S_OK The operation completed successfully. E_FAIL The function was called from an invalid process.
The TriggerFileDownload function is designed to allow Browser Helper Objects (BHOs) to request Internet Explorer to download a file. Consequently, the function is allowed only from the process that hosts BHOs.
When you call TriggerFileDownload, the user is prompted to download the file passed as the lpszURL parameter. If the user cancels the confirmation dialog box, the file is not downloaded.
For security reasons, the confirmation dialog box is displayed for all file downloads requested using TriggerFileDownload, even if the user has previously specified files of similar types to always open.
Stock Implementation ieframe.dll Custom Implementation No Import library None Minimum availability Internet Explorer 9 Minimum operating systems Windows Vista