Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IViewExtensionCallback::AddView method

The AddView method adds a view to the result pane. This method is implemented by MMC and is called by view extensions. For more information, see Extending Views.

Syntax


HRESULT AddView(
  [in] PMMC_EXT_VIEW_DATA pExtViewData
);

Parameters

pExtViewData [in]

A pointer to an MMC_EXT_VIEW_DATA structure, which contains information about the view being added to the result pane. The bReplacesDefaultView member of the MMC_EXT_VIEW_DATA structure determines if the standard view is removed when adding the new view.

Return value

If successful, the return value is S_OK. Other return values indicate an error code.

Examples


MMC_EXT_VIEW_DATA extviewdata;
HRESULT hr;

ZeroMemory(&extviewdata, sizeof(extviewdata));
// GUID_MyView, pszMyURL and pszMyTitle are application-defined.
extviewdata.viewID = GUID_MyView;
extviewdata.pszURL = pszMyURL;
extviewdata.pszViewTitle = pszMyTitle;
extviewdata.bReplacesDefaultView = FALSE;
// pViewExtensionCallback is a pointer to IViewExtensionCallback.
hr = pViewExtensionCallback->AddView(&extviewdata);
if (S_OK != hr)
    OutputDebugString("Failed AddView\n");

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

Library

Mmc.lib

DLL

Mmcndmgr.dll

See also

Extending Views
View Extension Mechanism
IExtendView
IExtendView::GetViews
MMC_EXT_VIEW_DATA

 

 

Show: