IVsHierarchyDropDataTarget.Drop Method
Called when one or more items are dropped into the target hierarchy or hierarchy window when the mouse button is released.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function Drop ( _
pDataObject As IDataObject, _
grfKeyState As UInteger, _
itemid As UInteger, _
<OutAttribute> ByRef pdwEffect As UInteger _
) As Integer
'Usage
Dim instance As IVsHierarchyDropDataTarget
Dim pDataObject As IDataObject
Dim grfKeyState As UInteger
Dim itemid As UInteger
Dim pdwEffect As UInteger
Dim returnValue As Integer
returnValue = instance.Drop(pDataObject, _
grfKeyState, itemid, pdwEffect)
int Drop(
IDataObject pDataObject,
uint grfKeyState,
uint itemid,
out uint pdwEffect
)
int Drop(
[InAttribute] IDataObject^ pDataObject,
[InAttribute] unsigned int grfKeyState,
[InAttribute] unsigned int itemid,
[InAttribute] [OutAttribute] unsigned int% pdwEffect
)
abstract Drop :
pDataObject:IDataObject *
grfKeyState:uint32 *
itemid:uint32 *
pdwEffect:uint32 byref -> int
function Drop(
pDataObject : IDataObject,
grfKeyState : uint,
itemid : uint,
pdwEffect : uint
) : int
Parameters
- pDataObject
Type: Microsoft.VisualStudio.OLE.Interop.IDataObject
[in] Pointer to the IDataObject interface on the item being dragged. This data object contains the data being transferred in the drag-and-drop operation. If the drop occurs, then this data object (item) is incorporated into the target hierarchy or hierarchy window.
- grfKeyState
Type: System.UInt32
[in] Current state of the keyboard and the mouse modifier keys. Valid values are shown in the following table. These values can be combined using a bitwise OR operator.Hex
Value
Description
0x0001
MK_LBUTTON
Left mouse button is clicked.
0x0002
MK_RBUTTON
Right mouse button is clicked.
0x0004
MK_SHIFT
SHIFT key is pressed.
0x0008
MK_CONTROL
CONTROL key is pressed.
0x0010
MK_MBUTTON
Middle mouse button is clicked.
0x0020
MK_ALT
ALT key is pressed.
- itemid
Type: System.UInt32
[in] Item identifier of the drop data target over which the item is being dragged. For a list of itemid values, see VSITEMID.
- pdwEffect
Type: System.UInt32%
[in, out] Visual effects associated with the drag-and drop-operation, such as a cursor, bitmap, and so on. The value of dwEffects passed to the source object via the OnDropNotify method is the value of pdwEffects returned by the Drop method.
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 IVsHierarchyDropDataTarget::Drop(
[in]IDataObject * pDataObject,
[in]DWORD grfKeyState,
[in]VSITEMID itemid,
[in,out]DWORD * pdwEffect
);
In implementing this method you must incorporate the data object into the target. Use the formats available in the IDataObject interface, available through pDataObject, along with the current state of the modifier keys to determine how the data is to be incorporated (by linking, copying, or moving).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsHierarchyDropDataTarget Interface