Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

IVsUIHierWinClipboardHelper.Paste Method

Pastes a data object from the clipboard to the hierarchy.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int Paste (
	[InAttribute] IDataObject pDataObject,
	[InAttribute] uint dwEffects
)
int Paste (
	/** @attribute InAttribute() */ IDataObject pDataObject, 
	/** @attribute InAttribute() */ UInt32 dwEffects
)
function Paste (
	pDataObject : IDataObject, 
	dwEffects : uint
) : int

Parameters

pDataObject

[in] Pointer to the IDataObject interface on the item being pasted. This data object contains the data being transferred in the paste operation. If the paste occurs, then this data object (hierarchy item) is incorporated into the target hierarchy.

dwEffects

[in] Pointer to the value of the pdwEffect parameter of the IVsHierarchy object, identifying all effects that the hierarchy supports.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell.idl:

HRESULT IVsUIHierWinClipboardHelper::Paste(
   [in] IDataObject *pDataObject,
   [in] DWORD dwEffects
);

When a paste occurs on the target hierarchy, the source hierarchy receives paste notification from the environment through the OnPaste method.

Drop effects are included in the dwEffect parameter and describe the action associated with a drop operation. The following table shows possible dwEffect values and their descriptions:

NoteNote

These effects are exclusive and cannot be combined using the bitwise OR operator.

EFFECT name

Value1

Description

DROPEFFECT_NONE

0

Drop target (hierarchy window) cannot accept the data. No drop would be allowed.

DROPEFFECT_COPY

1

Dropped item remains in the source and a copy of it is added to the target.

DROPEFFECT_MOVE

2

Dropped item was added to the target. The item is removed from the source and its storage is deleted.

DROPEFFECT_LINK

4

A link to the source item is added to the target so the item should be removed from the source but the storage should remain so that the link is not broken. A link is therefore a special case of move.

1. The values of the dwEffects parameter are taken from the DROPEFFECT enumeration in the MSDN Library Platform SDK documentation set.

Community Additions

ADD
Show:
© 2015 Microsoft