Condividi tramite


IEProcess class

Static helper class used for binding to the IEProcess export tables.

IEProcess has these types of members:

  • Methods

Methods

The IEProcess class has these methods.

Method Description
GetProcessModule

Gets a module handle that hosts the Internet Explorer per-process exports.

GetTabWindowExports

Gets a table of exports that implement behaviors specific to the tab window.

 

Remarks

The following code demonstrates how to use this class to prevent a modal dialog box from appearing until the current tab window becomes visible.

INT_PTR WINAPI Detour_DialogBoxParamW(
        HINSTANCE hInstance, LPCWSTR lpTemplateName, 
        HWND hwndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
{
    INT_PTR nRes = -1;
 
    HMODULE hmod = IEProcess::GetProcessModule();

    HRESULT hr = IEProcess::GetTabWindowExports(hmod)->WaitForTabWindow(
            false, hwndParent, &hwndParent);
    if (SUCCEEDED(hr))
    {
        HANDLE hModalDialogLock;
        hr = IEProcess::GetTabWindowExports(hmod)->AcquireModalDialogLockAndParent(
                hwndParent, &hwndParent, &hModalDialogLock);
        if (SUCCEEDED(hr))    
        {
            nRes = Real_DialogBoxParamW(hInstance, lpTemplateName, 
                    hwndParent, lpDialogFunc, dwInitParam);
            IEProcess::GetTabWindowExports(hmod)->ReleaseModalDialogLockAndParent(
                    hModalDialogLock);
        }
    }
    
    return nRes;
} 

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Header

Ieprocess.h

DLL

Iertutil.dll