URLOpenBlockingStream

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function 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 using the IStream::Read method.


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

pCaller

Address of the controlling IUnknown interface. If the client application or control is not a Component Object Model (COM) object or Microsoft 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 parameter 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 parameter can be set to NULL.

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

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.

Headerurlmon.h, urlmon.idl
Libraryurlmon.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Show: