Partager via


IBindStatusCallback::OnStartBinding (Windows Embedded CE 6.0)

1/6/2010

This method notifies the client about the callback methods it is registered to receive. This notification is a response to the flags the client requested in the RegisterBindStatusCallback function.

Syntax

HRESULT OnStartBinding(
  DWORD dwReserved,
  IBinding* pib
);

Parameters

  • dwReserved
    [in] Reserved. Must be set to 0.
  • pib
    [in] Pointer to the IBinding interface of the current bind operation. This cannot be NULL. The client should call AddRef on this pointer to keep a reference to the binding object.

Return Value

Returns S_OK if this is successful or E_INVALIDARG if the pib parameter is invalid.

Remarks

Asynchronous monikers typically call this method before the call to the IMoniker::BindToStorage or IMoniker::BindToObject method has returned.

In the call to this method, the moniker also provides the client with a pointer to the IBinding interface for the binding object associated with the current bind operation. The client can use the IBinding interface to control the progress of the bind operation.

To keep a reference to the binding object, the client must store the pointer to the IBinding interface and call AddRef on it. When the client no longer needs the reference, it must call Release on it. Be aware that calling Release does not cancel the bind operation. It merely frees the reference to the IBinding interface sent in the callback.

Client applications that implement the IBindStatusCallback interface can return E_UNIMPL or S_OK if they are not interested in receiving this notification.

The IBinding::Abort method will not work correctly in an implementation of IBindStatusCallback::OnStartBinding. To abort the binding, IBindStatusCallback::OnStartBinding should return E_FAIL.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IBindStatusCallback
URL Moniker Services Interfaces