ClipboardObject.IDataObject.GetDataHere Method
Obtains data from a source data object. This method, which is called by a data consumer, differs from the IDataObject.GetData method in that the caller must allocate and free the specified storage medium.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Private Sub GetDataHere ( _
pFormatetc As FORMATETC(), _
pRemoteMedium As STGMEDIUM() _
) Implements IDataObject.GetDataHere
void IDataObject.GetDataHere(
FORMATETC[] pFormatetc,
STGMEDIUM[] pRemoteMedium
)
private:
virtual void GetDataHere(
array<FORMATETC>^ pFormatetc,
array<STGMEDIUM>^ pRemoteMedium
) sealed = IDataObject::GetDataHere
private abstract GetDataHere :
pFormatetc:FORMATETC[] *
pRemoteMedium:STGMEDIUM[] -> unit
private override GetDataHere :
pFormatetc:FORMATETC[] *
pRemoteMedium:STGMEDIUM[] -> unit
JScript does not support explicit interface implementations.
Parameters
- pFormatetc
Type: array<Microsoft.VisualStudio.OLE.Interop.FORMATETC[]
A reference to a FORMATETC structure, passed by reference, that defines the format, medium, and target device to use when passing the data. Only one medium can be specified in tymed, and only the following TYMED values are valid: TYMED_ISTORAGE, TYMED_ISTREAM, TYMED_HGLOBAL, and TYMED_FILE.
- pRemoteMedium
Type: array<Microsoft.VisualStudio.OLE.Interop.STGMEDIUM[]
A STGMEDIUM, passed by reference, that defines the storage medium containing the data being transferred. The medium must be allocated by the caller and filled in by this method. The caller must also free the medium. The implementation of this method must always supply a value of nulla null reference (Nothing in Visual Basic) for the pUnkForRelease member of the STGMEDIUM structure that this parameter points to.
Implements
IDataObject.GetDataHere(array<FORMATETC[], array<STGMEDIUM[])
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the pFormatetc and/or pRemoteMedium parameters are nulla null reference (Nothing in Visual Basic). |
ArgumentException | The clipboard object is not a wrapped Microsoft.VisualStudio.OLE.Interop.IDataObject and the length of the pFormatetc and/or pRemoteMedium structures are zero. |
Remarks
If the clipboard object wraps an existing IDataObject (from the Microsoft.VisualStudio.OLE.Interop namespace), this method delegates the call to the corresponding GetDataHere(array<FORMATETC[], array<STGMEDIUM[]) from that namespace. Otherwise, it attempts to translate the call to the corresponding GetDataHere from the System.Runtime.InteropServices.ComTypes namespace, in case the clipboard object could be wrapping an existing IDataObject.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.