Share via


URLOpenBlockingStreamW

Send Feedback

Creates a blocking type stream object from a URL and downloads the data from the Internet. When the data is downloaded, the client application or control can read it by using the IStream::Read method.

Syntax

HRESULT URLOpenBlockingStreamW(
  LPUNKNOWN pCaller,
  LPCSTR szURL,
  LPSTREAM * ppStream,
  DWORD dwReserved,
  LPBINDSTATUSCALLBACK lpfnCB
);

Parameters

  • pCaller
    Address of the controlling IUnknown interface. If the client application or control is not a Component Object Model (COM) object or ActiveX® control, the parameter can be set to NULL.
  • szURL
    Address of a string value containing the URL to be converted to a stream object. This cannot be set to NULL.
  • ppStream
    Address of the IStream interface on the stream object created by this function. The caller can read from the stream as soon as it has this pointer.
  • dwReserved
    Reserved. Must be zero.
  • lpfnCB
    Address of the caller's IBindStatusCallback interface. This can be set to NULL.

Return Values

Returns S_OK if the operation succeeded, or E_OUTOFMEMORY if there was insufficient memory to complete the operation.

Remarks

This function is synchronous and will only return after all the data has been downloaded from the Internet.

URLOpenBlockingStream calls the IBindStatusCallback::OnProgress method (if provided) on a connection activity, including the arrival of data. IBindStatusCallback::OnDataAvailable is never called. Implementing IBindStatusCallback::OnProgress allows a caller to implement a user interface or other progress monitoring functionality. It also allows the download operation to be canceled by returning E_ABORT from the IBindStatusCallback::OnProgress call.

Requirements

Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: urlmon.h
Library: urlmon.lib

See Also

URL Moniker Services Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.