次の方法で共有


IVsObjectList2.GetExtendedClipboardVariant Method

Definition

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

public:
 int GetExtendedClipboardVariant(System::UInt32 index, System::UInt32 grfFlags, cli::array <Microsoft::VisualStudio::Shell::Interop::VSOBJCLIPFORMAT> ^ pcfFormat, [Runtime::InteropServices::Out] System::Object ^ % pvarFormat);
int GetExtendedClipboardVariant(unsigned int index, unsigned int grfFlags, std::Array <Microsoft::VisualStudio::Shell::Interop::VSOBJCLIPFORMAT> const & pcfFormat, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & pvarFormat);
public int GetExtendedClipboardVariant (uint index, uint grfFlags, Microsoft.VisualStudio.Shell.Interop.VSOBJCLIPFORMAT[] pcfFormat, out object pvarFormat);
abstract member GetExtendedClipboardVariant : uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.VSOBJCLIPFORMAT[] * obj -> int
Public Function GetExtendedClipboardVariant (index As UInteger, grfFlags As UInteger, pcfFormat As VSOBJCLIPFORMAT(), ByRef pvarFormat As Object) As Integer

Parameters

index
UInt32

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

grfFlags
UInt32

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

pcfFormat
VSOBJCLIPFORMAT[]

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

pvarFormat
Object

[out] Specifies a pointer to a variant where you render the data. The environment frees the variant when it is done with it.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

[C++]

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.

Applies to