Freigeben über


IHeaderCtrl2::DeleteColumn method

The IHeaderCtrl2::DeleteColumn method removes a column from the header of the result view.

Syntax

HRESULT DeleteColumn(
  [in] int nCol
);

Parameters

  • nCol [in]
    A zero-based index that identifies the column to be removed.

Return value

This method can return one of these values.

  • S_OK
    The column was successfully deleted.

  • E_UNEXPECTED
    The current result view type is not a standard console list view. If the snap-in returned a view type that was an OLE custom control (OCX) or a webpage in the ppViewType parameter of its IComponent::GetResultViewType method, any method dealing with columns returns E_UNEXPECTED.

  • E_INVALIDARG
    The nCol parameter is not a valid column index.

Remarks

If a column is removed, all columns with indexes greater than the one removed are adjusted down by one.

MMC does not persist in memory any changes made to a column set due to the action of IHeaderCtrl2::DeleteColumn, so snap-ins must update persisted column configuration data after deleting columns from a column set. For more information, see IHeaderCtrl2 and Column Persistence.

Notes to Callers

This method returns E_FAIL when an item has already been inserted into the result view.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IHeaderCtrl2

IHeaderCtrl2 and Column Persistence