IVsObjectList2.GetExtendedClipboardVariant Method

Asks the given list item to renders a specific clipboard format as a variant.

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

Syntax

‘선언
Function GetExtendedClipboardVariant ( _
    index As UInteger, _
    grfFlags As UInteger, _
    pcfFormat As VSOBJCLIPFORMAT(), _
    <OutAttribute> ByRef pvarFormat As Object _
) As Integer
‘사용 방법
Dim instance As IVsObjectList2
Dim index As UInteger
Dim grfFlags As UInteger
Dim pcfFormat As VSOBJCLIPFORMAT()
Dim pvarFormat As Object
Dim returnValue As Integer

returnValue = instance.GetExtendedClipboardVariant(index, _
    grfFlags, pcfFormat, pvarFormat)
int GetExtendedClipboardVariant(
    uint index,
    uint grfFlags,
    VSOBJCLIPFORMAT[] pcfFormat,
    out Object pvarFormat
)
int GetExtendedClipboardVariant(
    [InAttribute] unsigned int index, 
    [InAttribute] unsigned int grfFlags, 
    [InAttribute] array<VSOBJCLIPFORMAT>^ pcfFormat, 
    [OutAttribute] Object^% pvarFormat
)
abstract GetExtendedClipboardVariant : 
        index:uint32 * 
        grfFlags:uint32 * 
        pcfFormat:VSOBJCLIPFORMAT[] * 
        pvarFormat:Object byref -> int 
function GetExtendedClipboardVariant(
    index : uint, 
    grfFlags : uint, 
    pcfFormat : VSOBJCLIPFORMAT[], 
    pvarFormat : Object
) : int

Parameters

  • index
    Type: System.UInt32
    [in] Specifies the index of the list item of interest.
  • pvarFormat
    Type: System.Object%
    [out] Specifies a pointer to a variant where you render the data. The environment frees the variant when it is done with it.

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 vsshell80.idl:

HRESULT IVsObjectList2::GetExtendedClipboardVariant(
   [in] ULONG Index, 
   [in] VSOBJCFFLAGS grfFlags,
    [in] const VSOBJCLIPFORMAT *pcfFormat, 
   [out] VARIANT *pvarFormat
);

When the user requests a copy and paste of drag-and-drop operation on an item in your object list, the environment calls EnumClipboardFormats to see which formats your list supports. If the format is a composite format, as indicated by a flag in the pcfFormat parameter, the environment calls GetExtendedClipboardVariant when the actual paste or drop operation happens. Return a pointer to the variant in pvarFormat.

.NET Framework Security

See Also

Reference

IVsObjectList2 Interface

IVsObjectList2 Members

Microsoft.VisualStudio.Shell.Interop Namespace