IELaunchURL function
Opens a URL in an Windows Internet Explorer process with an appropriate integrity level, and returns information about the new process.
Syntax
HRESULT IELaunchURL( _In_ LPCWSTR pszUrl, _In_ LPPROCESS_INFORMATION pProcInfo, _In_opt_ LPIELAUNCHURL lpInfo );
Parameters
- pszUrl [in]
-
A pointer to a NULL-terminated string containing the URL to be opened. If this parameter is NULL, the user's home page is opened.
- pProcInfo [in]
-
A pointer to a PROCESS_INFORMATION structure that receives information about the process.
- lpInfo [in, optional]
-
A pointer to an IELAUNCHURLINFO structure; can be NULL.
Return value
Returns S_OK if the URL is successfully opened in a new Internet Explorer process, or an error value otherwise.
Examples
The following example shows a function that opens Internet Explorer processes with an appropriate integrity level.
HRESULT LaunchIE(LPCWSTR pszURL)
{
PROCESS_INFORMATION procInfo;
IELAUNCHURLINFO launchInfo;
launchInfo.cbSize = sizeof(IELAUNCHURLINFO);
launchInfo.dwCreationFlags = NULL;
HRESULT hr = IELaunchURL(pszURL, &procInfo, &launchInfo);
if (SUCCEEDED(hr))
{
WaitForInputIdle(procInfo.hProcess, 2000);
CloseHandle(procInfo.hProcess);
CloseHandle(procInfo.hThread);
}
return hr;
}
Requirements
|
Minimum supported client |
Windows Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Product |
Internet Explorer 7 |
|
Header |
|
|
Library |
|
|
DLL |
|