Interface IComDataObject
The IDataObject interface specifies methods that enable data transfer and notification of changes in data.
Namespace: Syncfusion.CompoundFile.DocIO.Native
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public interface IComDataObject
Methods
DAdvise(ref FORMATETC, UInt32, IntPtr, ref UInt32)
Called by an object supporting an advise sink to create a connection between a data object and the advise sink.
Declaration
uint DAdvise(ref FORMATETC pformatetc, uint advf, IntPtr pAdvSink, ref uint pdwConnection)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatetc | Pointer to a FORMATETC structure that defines the format, target device, aspect, and medium that will be used for future notifications. |
System.UInt32 | advf | DWORD that specifies a group of flags for controlling the advisory connection. |
System.IntPtr | pAdvSink | Pointer to the IAdviseSink interface on the advisory sink that will receive the change notification. |
System.UInt32 | pdwConnection | Pointer to a DWORD token that identifies this connection. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - The advisory connection was created. Otherwise error code. |
DUnadvise(UInt32)
Destroys a notification connection that had been previously set up.
Declaration
uint DUnadvise(uint dwConnection)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | dwConnection | DWORD token that specifies the connection to remove. Use the value returned by IDataObject::DAdvise when the connection was originally established. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - The specified connection was successfully deleted. OLE_E_NOCONNECTION - The specified dwConnection is not a valid connection. OLE_E_ADVISENOTSUPPORTED - This IDataObject implementation does not support notification. |
EnumDAdvise(ref IntPtr)
Creates an object that can be used to enumerate the current advisory connections.
Declaration
uint EnumDAdvise(ref IntPtr ppenumAdvise)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | ppenumAdvise | Address of IEnumSTATDATA* pointer variable that receives the interface pointer to the new enumerator object. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - The enumerator object is successfully instantiated or there are no connections. OLE_E_ADVISENOTSUPPORTED - Advisory notifications are not supported by this object. |
EnumFormatEtc(UInt32, ref IComEnumFORMATETC)
Creates an object for enumerating the FORMATETC structures for a data object. These structures are used in calls to IDataObject::GetData or IDataObject::SetData.
Declaration
uint EnumFormatEtc(uint dwDirection, ref IComEnumFORMATETC ppenumFormatEtc)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | dwDirection | Direction of the data through a value from the enumeration DATADIR. |
Syncfusion.CompoundFile.DocIO.Native.IComEnumFORMATETC | ppenumFormatEtc | Address of IEnumFORMATETC* pointer variable that receives the interface pointer to the new enumerator object. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - Enumerator object was successfully created. E_NOTIMPL - The direction specified by dwDirection is not supported. OLE_S_USEREG - Requests that OLE enumerate the formats from the registry. |
GetCanonicalFormatEtc(ref FORMATETC, ref FORMATETC)
Provides a standard FORMATETC structure that is logically equivalent to one that is more complex.
Declaration
uint GetCanonicalFormatEtc(ref FORMATETC pformatectIn, ref FORMATETC pformatetcOut)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatectIn | Pointer to the FORMATETC structure that defines the format, medium, and target device that the caller would like to use to retrieve data in a subsequent call such as IDataObject::GetData. |
FORMATETC | pformatetcOut | Pointer to a FORMATETC structure that contains the most general information possible for a specific rendering, making it canonically equivalent to pFormatetcIn. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - The returned FORMATETC structure is different from the one that was passed. Otherwise error code. |
GetData(ref FORMATETC, ref STGMEDIUM)
Called by a data consumer to obtain data from a source data object.
Declaration
uint GetData(ref FORMATETC pformatetcIn, ref STGMEDIUM pRemoteMedium)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatetcIn | Pointer to the FORMATETC structure that defines the format, medium, and target device to use when passing the data. |
STGMEDIUM | pRemoteMedium | Pointer to the STGMEDIUM structure that indicates the storage medium containing the returned data through its tymed member, and the responsibility for releasing the medium through the value of its pUnkForRelease member. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - Data was successfully retrieved and placed in the storage medium provided. Otherwise error code. |
GetDataHere(ref FORMATETC, ref STGMEDIUM)
Called by a data consumer to obtain data from a source data object. This method differs from the GetData method in that the caller must allocate and free the specified storage medium.
Declaration
uint GetDataHere(ref FORMATETC pformatetc, ref STGMEDIUM pRemoteMedium)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatetc | Pointer to the FORMATETC structure that defines the format, medium, and target device to use when passing the data. |
STGMEDIUM | pRemoteMedium | Pointer to the STGMEDIUM structure that defines the storage medium containing the data being transferred. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - Data was successfully retrieved and placed in the storage medium provided. Otherwise error code. |
QueryGetData(ref FORMATETC)
Determines whether the data object is capable of rendering the data described in the FORMATETC structure.
Declaration
uint QueryGetData(ref FORMATETC pformatetc)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatetc | Pointer to the FORMATETC structure defining the format, medium, and target device to use for the query. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - Subsequent call to IDataObject::GetData would probably be successful. Otherwise error code. |
SetData(ref FORMATETC, ref STGMEDIUM, Int32)
Called by an object containing a data source to transfer data to the object that implements this method.
Declaration
uint SetData(ref FORMATETC pformatetc, ref STGMEDIUM pmedium, int fRelease)
Parameters
Type | Name | Description |
---|---|---|
FORMATETC | pformatetc | Pointer to the FORMATETC structure defining the format used by the data object when interpreting the data contained in the storage medium. |
STGMEDIUM | pmedium | Pointer to the STGMEDIUM structure defining the storage medium in which the data is being passed. |
System.Int32 | fRelease | If TRUE, the data object called, which implements IDataObject::SetData, owns the storage medium after the call returns. This means it must free the medium after it has been used by calling the ReleaseStgMedium function. |
Returns
Type | Description |
---|---|
System.UInt32 | S_OK - Data was successfully transferred. Otherwise error code. |