IDataObject::SetData
Transfers data to the source data object.
HRESULT SetData(
FORMATETC * pFormatetc,
| //Points to the data and formats used to interpret the data
|
STGMEDIUM * pmedium,
| //Points to the storage medium in which the data is transferred
|
BOOL fRelease
| //Indicates what owns the storage medium after the call is completed
|
);
|
|
Parameters
pFormatetc
[in]Points to the format used by the data object when interpreting the data
contained in the storage medium.
pmedium
[in]Points to the storage medium.
fRelease
[in]Indicates what has ownership of the storage medium after the call is
complete. If
fRelease is TRUE,
IDataObject::SetData takes ownership, freeing the medium after it has been used by calling
ReleaseStgMedium. If
fRelease is FALSE, the caller retains ownership and the callee uses the storage medium
for the duration of the call only.
Return Values
S_OK
Data was successfully transferred.
E_FAIL
The data was not transferred.
E_NOTIMPL
This method is not implemented for the data object.
E_INVALIDARG
One or more arguments are invalid.
E_UNEXPECTED
An unexpected error occurred.
E_OUTOFMEMORY
The data wasn't transferred because the system ran out of memory.
DV_E_LINDEX
Invalid value for
lindex; currently, only -1 is supported.
DV_E_FORMATETC
Invalid value for
pFormatetc.
DV_E_TYMED
Invalid
tymed value.
DV_E_DVASPECT
Invalid
dwAspect value.
OLE_E_NOTRUNNING
Object application is not running.
Comments
The callee does not take ownership of the data until it has successfully used
it and no error code is returned.
The type of medium (
TYMED) in the
pformatetc and
pmedium parameters must be equal. For example, one cannot be an hGlobal and the other
a stream.
See Also
IDataObject::GetData,
FORMATETC,
STGMEDIUM
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database