Retrieves a data object containing the current contents of the embedded object on which this method is called. Using the pointer to this data object, it is possible to create a new embedded object with the same data as the original.
HRESULT GetClipboardData(
DWORD dwReserved, //Reserved
IDataObject **ppDataObject
//Address of output variable that receives the
// IDataObject interface pointer
);
You can use the GetClipboardData method to convert a linked object to an embedded object, in which case the container application would call IOleObject::GetClipboardData and then pass the data received to OleCreateFromData. This method returns a pointer to a data object that is identical to what would have been passed to the Clipboard by a standard copy operation.
If you want a stable snapshot of the current contents of an embedded object, call IOleObject::GetClipboardData. Should the data change, you will need to call the function again for an updated snapshot. If you want the caller to be informed of changes that occur to the data, call IDataObject::QueryInterface, then call IDataObject::DAdvise.
If you implement this function, you must return an IDataObject pointer for an object whose data will not change.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oleidl.h.
IDataObject, IOleObject::InitFromData, IUnknown::QueryInterface, OleCreateFromData