10.5.2 IADsCOMBindingInfo (Optional)

The optional IADsCOMBindingInfo interface is used to obtain binding information for services that publish COM Interfaces. IADsCOMBindingInfo is designed for C/C++ and other VTABLE clients; it is not supported from Automation controllers.

The interface definition is as follows:

interface IADsCOMBindingInfo: IUnknown

{

// Read/write properties

[propget]

HRESULT DisplayName([out, retval]BSTR *pbstrDisplayName);

[propput]

HRESULT DisplayName([in]BSTR bstrDisplayName);

[propget]

HRESULT Object ([in]REFIID riid, [out,iid_is(riid)] void **ppvObject);

[propput]

HRESULT Object ([in]Iunknown* punkObject);

[propget]

HRESULT Moniker ([out, retval]Imoniker **ppMk);

[propput]

HRESULT Moniker ([in]Imoniker *pMk);

// Methods.

HRESULT put_BindingInfo([in] BSTR* pszDisplayName,

[in] IUnknown* punkObject,

[in] IMoniker* pmk);

HRESULT get_BindingInfo([out, retval] BSTR* pszDisplayName,

[in] REFIID riid,

out, iid_is(riid)] void** ppvObject,

[out, retval] IMoniker** ppmk);

};

Method

Syntax

Description

DisplayName

BSTR

Gets and sets a BSTR display name that can be passed to CreateFileMoniker to bind this service

Object

Interface

Gets and sets an interface pointer that can be used to bind to a running instance of this service. The provider is responsible for marahslling and storing the interface pointer on a PUT_ operation and retrieving and unmarshalling the interface pointer on a GET_ operation.

Moniker

Interface

Gets and sets a Moniker that can be used to bind to an instance of this service. The provider is responsible for serializing and storing the Moniker on a PUT_ and retrieving and restoring the Moniker on a GET_.

Put_BindingInfo

Method

sets an array of display names, interface pointers, and/or monikers used to bind this service. Each parameter is an array of pointers terminated by a NULL pointer. A NULL for any parameter indicates that it is unused.

Get_BindingInfo

Method

gets an array of display names, interface pointers, and/or monikers used to bind this service. Each parameter is an array of pointers terminated by a NULL pointer. A NULL for any parameter indicates that it is unused. The riid array is used to request a set of specific interface pointers from the underlying namespace.