Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Protected Mode
Reference
Functions
 IELaunchURL Function

  Switch on low bandwidth view
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(      
    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;
}

Function Information

Stock Implementationieframe.dll
Custom ImplementationNo
Headeriepmapi.h
Import libraryiepmapi.lib
Minimum availabilityInternet Explorer 7
Minimum operating systems Windows Vista
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Issue with given example      Gu0sur20   |   Edit   |   Show History
Beware, PROCESS_INFORMATION has no member named dwCreationFlags nor cbSize. These lines should be omited.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker