
The following steps are needed to create a URL moniker for an application:
- Optional, but recommended. Implement the IBindStatusCallback interface.
- Optional, but recommended. Create an instance of your IBindStatusCallback interface.
- Call CreateURLMoniker with the URL and get the IMoniker interface.
- Call CreateAsyncBindCtx and get the IBindCtx interface.
- If IBindStatusCallback has been implemented, call RegisterBindStatusCallback with the IBindCtx and IBindStatusCallback interfaces.
- Call one of IMoniker's binding methods (either IMoniker::BindToStorage or IMoniker::BindToObject) with the IBindCtx interface. In the asynchronous case (where IBindStatusCallback has been implemented), the client application may get a pointer to the IStream or IStorage interface. The client application should call the IUnknown::Release method on the interface and use the interface returned in the IBindStatusCallback::OnDataAvailable call.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::GetBindInfo method is called by the IMoniker's binding method to get the bind info.
Warning The size of the BINDINFO structure used by IBindStatusCallback::GetBindInfo has changed with the release of Microsoft Internet Explorer 4.0. Developers must write code that checks the size of the BINDINFO structure that is passed into their implementation of the IBindStatusCallback::GetBindInfo method before writing to members of the structure. See Handling BINDINFO Structures section for more information.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnStartBinding method will be called.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnProgress method will be called.
- If IBindStatusCallback has been implemented, either IBindStatusCallback::OnDataAvailable (if IMoniker::BindToStorage was used) or IBindStatusCallback::OnObjectAvailable (if IMoniker::BindToObject was used) will be called.
- If IBindStatusCallback has been implemented, steps 9 and 10 are repeated until the binding is completed.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnStopBinding method will be called.
The following steps are needed to create a URL moniker for a control:
- Optional, but recommended. Implement the IBindStatusCallback interface.
- Optional, but recommended. Create an instance of the IBindStatusCallback interface.
- Call CreateAsyncBindCtx and get the IBindCtx interface.
- Call IBindHost::CreateMoniker with the IBindCtx interface and get the IMoniker interface.
- Call one of IBindHost's binding methods (either IBindHost::MonikerBindToStorage or IBindHost::MonikerBindToObject) with the IBindCtx, IMoniker, and IBindStatusCallback (if implemented) interfaces.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::GetBindInfo method is called by the IMoniker's binding method to get the bind info.
Warning The size of the BINDINFO structure used by IBindStatusCallback::GetBindInfo has changed with the release of Microsoft Internet Explorer 4.0. Developers must write code that checks the size of the BINDINFO structure that is passed into their implementation of the IBindStatusCallback::GetBindInfo method before writing to members of the structure. See Handling BINDINFO Structures section for more information.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnStartBinding method will be called.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnProgress method will be called.
- If IBindStatusCallback has been implemented, either IBindStatusCallback::OnDataAvailable (if IBindHost::MonikerBindToStorage was used) or IBindStatusCallback::OnObjectAvailable (if IBindHost::MonikerBindToObject was used) will be called.
- If IBindStatusCallback has been implemented, steps 8 and 9 are repeated until the binding is completed.
- If IBindStatusCallback has been implemented, the IBindStatusCallback::OnStopBinding method will be called.
Note IE4/MSHTML does not support the IBindStatusCallback interface. Applications that are hosting IE4/MSHTML and want to get callbacks on the progress of the bind operation should implement the IPropertyNotifySink interface.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.