Click to return to the Networking, Protocols     
UrlMkSetSessionOption Fun...     URLOpenPullStream Functio...     URL Monikers Functions    
Web Workshop  |  Networking, Protocols & Data Formats

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

Syntax

HRESULT URLOpenBlockingStream(
    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 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 for future use. Must be zero.
lpfnCB
Address of the caller's IBindStatusCallback interface. This can be set to NULL.

Return Value

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.

Function Information

Windows NT Use version 4.0. Implemented as ANSI and Unicode functions.
Windows Use Windows 95 and later. Implemented as ANSI and Unicode functions.
Header Urlmon.h
Import Library Urlmon.lib
Minimum availability Internet Explorer 3.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.