IDataObject.GetDataHere(FORMATETC, STGMEDIUM) 方法

定义

从源数据对象中获取数据。Obtains data from a source data object. 数据使用者调用的此方法与 GetData(FORMATETC, STGMEDIUM) 方法的区别在于调用方必须分配并释放指定的存储介质。This method, which is called by a data consumer, differs from the GetData(FORMATETC, STGMEDIUM) method in that the caller must allocate and free the specified storage medium.

public:
 void GetDataHere(System::Runtime::InteropServices::ComTypes::FORMATETC % format, System::Runtime::InteropServices::ComTypes::STGMEDIUM % medium);
public void GetDataHere (ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
abstract member GetDataHere : FORMATETC * STGMEDIUM -> unit
Public Sub GetDataHere (ByRef format As FORMATETC, ByRef medium As STGMEDIUM)

参数

format
FORMATETC

由引用传递的、指向 FORMATETC 结构的指针,该结构定义传递数据时将使用的格式、介质和目标设备。A pointer to a FORMATETC structure, passed by reference, that defines the format, medium, and target device to use when passing the data. TYMED 中只能指定一个介质,并且只有下列 TYMED 值有效:TYMED_ISTORAGETYMED_ISTREAMTYMED_HGLOBALTYMED_FILEOnly one medium can be specified in TYMED, and only the following TYMED values are valid: TYMED_ISTORAGE, TYMED_ISTREAM, TYMED_HGLOBAL, or TYMED_FILE.

medium
STGMEDIUM

由引用传递的 STGMEDIUM,它定义包含正在传输的数据的存储介质。A STGMEDIUM, passed by reference, that defines the storage medium containing the data being transferred. 介质必须由调用方分配并由 GetDataHere(FORMATETC, STGMEDIUM) 填充。The medium must be allocated by the caller and filled in by GetDataHere(FORMATETC, STGMEDIUM). 调用方还必须释放介质。The caller must also free the medium. 此方法的实现必须始终为此参数指向的 pUnkForRelease 结构的 STGMEDIUM 成员提供一个 null 值。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.

注解

有关详细信息,请参阅 IDataObject:: GetDataHere 方法For more information, see IDataObject::GetDataHere method.

适用于