|
IOleObject::GetClipboardData
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,
| //Not currently implemented
| IDataObject **ppDataObject
| //Pointer to storage of interface pointer
| );
|
|
Parameters
dwReserved
[in] Reserved for future use; must be zero.
ppDataObject
[out] Points to an interface pointer to the data object. If an error is
returned, this parameter must be set to NULL. Each time an object receives a call to GetClipboardData, it must increase the reference count on the pointer that the method returns.
It is the caller's responsibility to call Release when it is done with the
pointer.
Return Values
S_OK
The data transfer object is successfully returned.
E_NOTIMPL
GetClipboardData is not supported.
OLE_E_NOTRUNNING
The object is not running.
Comments
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.
Notes to Callers
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.
Notes to Implementors
If you implement this function, you must return an IDataObject pointer for an object whose data will not change.
See Also
IDataObject, IOleObject::InitFromData, IUnknown::QueryInterface, OleCreateFromData
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|