共用方式為


IVsHierarchyDeleteHandler.DeleteItem Method

Handles the deletion or removal of a hierarchy item.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣告
Function DeleteItem ( _
    dwDelItemOp As UInteger, _
    itemid As UInteger _
) As Integer
'用途
Dim instance As IVsHierarchyDeleteHandler
Dim dwDelItemOp As UInteger
Dim itemid As UInteger
Dim returnValue As Integer

returnValue = instance.DeleteItem(dwDelItemOp, _
    itemid)
int DeleteItem(
    uint dwDelItemOp,
    uint itemid
)
int DeleteItem(
    [InAttribute] unsigned int dwDelItemOp, 
    [InAttribute] unsigned int itemid
)
abstract DeleteItem : 
        dwDelItemOp:uint32 * 
        itemid:uint32 -> int 
function DeleteItem(
    dwDelItemOp : uint, 
    itemid : uint
) : int

Parameters

  • dwDelItemOp
    Type: System.UInt32
    [in] Determines whether the hierarchy or hierarchy item is deleted from storage or removed from the project. Values are taken from the __VSDELETEITEMOPERATION enumeration.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsHierarchyDeleteHandler::DeleteItem(
   [in] VSDELETEITEMOPERATION dwDelItemOp,
   [in] VSITEMID itemid
);

Implement this method to delete or remove an item depending on the command option selected by the user.

.NET Framework Security

See Also

Reference

IVsHierarchyDeleteHandler Interface

IVsHierarchyDeleteHandler Members

Microsoft.VisualStudio.Shell.Interop Namespace