次の方法で共有


getDataMember

Returns a data access object (such as a row position) for a given data member.

Important

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, write a fully functional OLE DB provider using the native OLE DB interfaces.

Syntax

HRESULT getDataMember (
   DataMember    bstrDM
   REFIID        riid
   IUnknown    **ppunk);

Parameters

  • bstrDM
    [in] A string that describes the data member that represents one or more sets of data supported by the data source. This string is interpreted as case-insensitive.

  • riid
    [in] The interface identifier of the specified data access object.

  • ppunk
    [out] The pointer of the returned interface.

Return Codes

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

  • E_NOINTERFACE
    Does not support the specified data access object.

Comments

The default data member is specified by having either a zero-length string or a Null string. (They are equivalent.) If the data source does not support the desired data access object, it returns E_NOINTERFACE.

The return value from IDataSource::getDataMember is always an IUnknown pointer. It is the responsibility of the caller of the method to query for the appropriate interface. That is, the IID parameter does not specify which interface, but rather which data access object type to return.