IVsObjectList::GetExtendedClipboardVariant Method (UInt32, UInt32, array<VSOBJCLIPFORMAT>^, Object^)

 

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

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

int GetExtendedClipboardVariant(
	unsigned int index,
	unsigned int grfFlags,
	array<VSOBJCLIPFORMAT>^ pcfFormat,
	[OutAttribute] Object^% pvarFormat
)

Parameters

index
Type: System::UInt32

[in] Specifies the index of the list item of interest.

grfFlags
Type: System::UInt32

[in] Specifies multi-selection. Values are taken from the _VSOBJCFFLAGS enumeration.

pcfFormat
Type: array<Microsoft.VisualStudio.Shell.Interop::VSOBJCLIPFORMAT>^

[in] Specifies a VSOBJCLIPFORMAT structure defining the format requested.

pvarFormat
Type: System::Object^

[out] Specifies a pointer to a variant where you render the data. The environment will free 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.

From vsshell.idl:

HRESULT IVsObjectList::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 will call 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 will call GetExtendedClipboardVariant when the actual paste or drop operation happens. Return a pointer to the variant in pvarFormat.

Return to top
Show: