Partager via


IConsole2::GetMainWindow method

The IConsole2::GetMainWindow method returns a handle to the main frame window.

Syntax

HRESULT GetMainWindow(
  [out] HWND *phwnd
);

Parameters

  • phwnd [out]
    A pointer to a variable that receives the window handle.

Return value

This method can return one of these values.

  • S_OK
    The handle was successfully returned.

  • E_UNEXPECTED
    An unexpected error occurred.

  • E_INVALIDARG
    The parameter is invalid. This may indicate a NULL pointer.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IConsole3

IConsole2