IVsObjectList2.GetExtendedClipboardVariant 方法

定义

请求给定的列表项以变量形式呈现特定剪贴板格式。

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

参数

index
UInt32

中指定感兴趣的列表项的索引。

grfFlags
UInt32

中指定多选。 值取自 _VSOBJCFFLAGS 枚举。

pcfFormat
VSOBJCLIPFORMAT[]

中指定 VSOBJCLIPFORMAT 定义请求的格式的结构。

pvarFormat
Object

弄指定一个指针,该指针指向用于呈现数据的变量。 环境在完成后将释放变量。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell80:

[C++]

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

当用户请求复制并粘贴对象列表中某个项的拖放操作时,环境将调用 EnumClipboardFormats 以查看列表支持的格式。 如果格式为复合格式(如参数中的标志所示 pcfFormat ),则 GetExtendedClipboardVariant 当实际的粘贴或删除操作发生时,环境将调用。 返回指向中的变量的指针 pvarFormat

适用于