IDataObjectImpl Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at IDataObjectImpl Class.

This class provides methods for supporting Uniform Data Transfer and managing connections.

System_CAPS_ICON_important.jpg Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

template<class T>  
class IDataObjectImpl

Parameters

T
Your class, derived from IDataObjectImpl.

Public Methods

NameDescription
IDataObjectImpl::DAdviseEstablishes a connection between the data object and an advise sink. This enables the advise sink to receive notifications of changes in the object.
IDataObjectImpl::DUnadviseTerminates a connection previously established through DAdvise.
IDataObjectImpl::EnumDAdviseCreates an enumerator to iterate through the current advisory connections.
IDataObjectImpl::EnumFormatEtcCreates an enumerator to iterate through the FORMATETC structures supported by the data object. The ATL implementation returns E_NOTIMPL.
IDataObjectImpl::FireDataChangeSends a change notification back to each advise sink.
IDataObjectImpl::GetCanonicalFormatEtcRetrieves a logically equivalent FORMATETC structure to one that is more complex. The ATL implementation returns E_NOTIMPL.
IDataObjectImpl::GetDataTransfers data from the data object to the client. The data is described in a FORMATETC structure and is transferred through a STGMEDIUM structure.
IDataObjectImpl::GetDataHereSimilar to GetData, except the client must allocate the STGMEDIUM structure. The ATL implementation returns E_NOTIMPL.
IDataObjectImpl::QueryGetDataDetermines whether the data object supports a particular FORMATETC structure for transferring data. The ATL implementation returns E_NOTIMPL.
IDataObjectImpl::SetDataTransfers data from the client to the data object. The ATL implementation returns E_NOTIMPL.

The IDataObject interface provides methods to support Uniform Data Transfer. IDataObject uses the standard format structures FORMATETC and STGMEDIUM to retrieve and store data.

IDataObject also manages connections to advise sinks to handle data change notifications. In order for the client to receive data change notifications from the data object, the client must implement the IAdviseSink interface on an object called an advise sink. When the client then calls IDataObject::DAdvise, a connection is established between the data object and the advise sink.

Class IDataObjectImpl provides a default implementation of IDataObject and implements IUnknown by sending information to the dump device in debug builds.

Related Articles ATL Tutorial, Creating an ATL Project

IDataObject

IDataObjectImpl

Header: atlctl.h

Establishes a connection between the data object and an advise sink.

HRESULT DAdvise(
    FORMATETC* pformatetc,
    DWORD advf,
    IAdviseSink* pAdvSink,
    DWORD* pdwConnection);

Remarks

This enables the advise sink to receive notifications of changes in the object.

To terminate the connection, call DUnadvise.

See IDataObject::DAdvise in the Windows SDK.

Terminates a connection previously established through DAdvise.

HRESULT DUnadvise(DWORD dwConnection);

Remarks

See IDataObject::DUnadvise in the Windows SDK.

Creates an enumerator to iterate through the current advisory connections.

HRESULT DAdvise(
    FORMATETC* pformatetc,
    DWORD advf,
    IAdviseSink* pAdvSink,
    DWORD* pdwConnection);

Remarks

See IDataObject::EnumDAdvise in the Windows SDK.

Creates an enumerator to iterate through the FORMATETC structures supported by the data object.

HRESULT EnumFormatEtc(  
    DWORD dwDirection,
    IEnumFORMATETC** ppenumFormatEtc);

Remarks

See IDataObject::EnumFormatEtc in the Windows SDK.

Return Value

Returns E_NOTIMPL.

Sends a change notification back to each advise sink that is currently being managed.

HRESULT FireDataChange();

Return Value

A standard HRESULT value.

Retrieves a logically equivalent FORMATETC structure to one that is more complex.

HRESULT GetCanonicalFormatEtc(FORMATETC* pformatetcIn, FORMATETC* pformatetcOut);

Return Value

Returns E_NOTIMPL.

Remarks

See IDataObject::GetCanonicalFormatEtc in the Windows SDK.

Transfers data from the data object to the client.

HRESULT GetData(
    FORMATETC* pformatetcIn,
    STGMEDIUM* pmedium);

Remarks

The pformatetcIn parameter must specify a storage medium type of TYMED_MFPICT.

See IDataObject::GetData in the Windows SDK.

Similar to GetData, except the client must allocate the STGMEDIUM structure.

HRESULT GetDataHere(
    FORMATETC* pformatetc,
    STGMEDIUM* pmedium);

Return Value

Returns E_NOTIMPL.

Remarks

See IDataObject::GetDataHere in the Windows SDK.

Determines whether the data object supports a particular FORMATETC structure for transferring data.

HRESULT QueryGetData(FORMATETC* pformatetc);

Return Value

Returns E_NOTIMPL.

Remarks

See IDataObject::QueryGetData in the Windows SDK.

Transfers data from the client to the data object.

HRESULT SetData(
    FORMATETC* pformatetc,
    STGMEDIUM* pmedium,
    BOOL fRelease);

Return Value

Returns E_NOTIMPL.

Remarks

See IDataObject::SetData in the Windows SDK.

Class Overview

Show: