IDataObject.GetDataHere Method

DataObject.IDataObject.GetDataHere Method (FORMATETC, STGMEDIUM)


This API supports the product infrastructure and is not intended to be used directly from your code.

Obtains data from a source data object. This method, which is called by a data consumer, differs from the GetData method in that the caller must allocate and free the specified storage medium.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>]
private abstract GetDataHere : 
        formatetc:FORMATETC byref *
        medium:STGMEDIUM byref -> unit
[<SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)>]
private override GetDataHere : 
        formatetc:FORMATETC byref *
        medium:STGMEDIUM byref -> unit


Type: System.Runtime.InteropServices.ComTypes.FORMATETC

A pointer 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, or TYMED_FILE.

Type: System.Runtime.InteropServices.ComTypes.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 GetDataHere. The caller must also free the medium. The implementation of this method must always supply a value of null for the pUnkForRelease member of the STGMEDIUM structure that this parameter points to.

This member is an explicit interface member implementation. It can be used only when the DataObject is cast to an IDataObject interface.


for calling unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft