Compartilhar via


URLOpenBlockingStream (Windows CE 5.0)

Send Feedback

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(LPUNKNOWNpCaller,LPCSTRszURL,LPSTREAM* ppStream,DWORDdwReserved,LPBINDSTATUSCALLBACKlpfnCB);

Parameters

  • 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.

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Urlmon.h, Urlmon.idl.
Link Library: Urlmon.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.