다음을 통해 공유


IVsObjectList2.GetClipboardFormat Method

Asks the given list item to renders a specific clipboard format that it supports.

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

Syntax

‘선언
Function GetClipboardFormat ( _
    index As UInteger, _
    grfFlags As UInteger, _
    pFormatetc As FORMATETC(), _
    pMedium As STGMEDIUM() _
) As Integer
‘사용 방법
Dim instance As IVsObjectList2
Dim index As UInteger
Dim grfFlags As UInteger
Dim pFormatetc As FORMATETC()
Dim pMedium As STGMEDIUM()
Dim returnValue As Integer

returnValue = instance.GetClipboardFormat(index, _
    grfFlags, pFormatetc, pMedium)
int GetClipboardFormat(
    uint index,
    uint grfFlags,
    FORMATETC[] pFormatetc,
    STGMEDIUM[] pMedium
)
int GetClipboardFormat(
    [InAttribute] unsigned int index, 
    [InAttribute] unsigned int grfFlags, 
    [InAttribute] array<FORMATETC>^ pFormatetc, 
    [InAttribute] array<STGMEDIUM>^ pMedium
)
abstract GetClipboardFormat : 
        index:uint32 * 
        grfFlags:uint32 * 
        pFormatetc:FORMATETC[] * 
        pMedium:STGMEDIUM[] -> int 
function GetClipboardFormat(
    index : uint, 
    grfFlags : uint, 
    pFormatetc : FORMATETC[], 
    pMedium : STGMEDIUM[]
) : int

Parameters

  • index
    Type: System.UInt32
    [in] Specifies the index of the list item of interest.

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::GetClipboardFormat(
   [in] ULONG Index, 
   [in] VSOBJCFFLAGS grfFlags, 
   [in] FORMATETC *pFormatetc, 
   in] STGMEDIUM *pMedium
);

When the user requests a copy-paste or drag-drop operation on an item in your object list, the environment calls EnumClipboardFormats to see which formats your list supports. The environment then calls GetClipboardFormat for the item when the actual paste or drop operation happens. You then render the item in the requested format.

.NET Framework Security

See Also

Reference

IVsObjectList2 Interface

IVsObjectList2 Members

Microsoft.VisualStudio.Shell.Interop Namespace