Opens a URL in an Windows Internet Explorer process with an appropriate integrity level, and returns information about the new process.
Syntax
HRESULT IELaunchURL( LPCWSTR pszUrl, LPPROCESS_INFORMATION pProcInfo, 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] A pointer to an IELAUNCHURLINFO structure; can be NULL.
Return Value
Example
The following example shows a function that opens Internet Explorer processes with an appropriate integrity level. HRESULT LaunchIE(LPCWSTR pszURL) { PROCESS_INFORMATION procInfo; procInfo.cbSize = sizeof(PROCESS_INFORMATION); procInfo.dwCreationFlags = NULL; 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; }
The following example shows a function that opens Internet Explorer processes with an appropriate integrity level.
HRESULT LaunchIE(LPCWSTR pszURL) { PROCESS_INFORMATION procInfo; procInfo.cbSize = sizeof(PROCESS_INFORMATION); procInfo.dwCreationFlags = NULL; 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; }
Function Information
Stock Implementationieframe.dllCustom ImplementationNoHeaderiepmapi.hImport libraryiepmapi.libMinimum availabilityInternet Explorer 7Minimum operating systems Windows Vista