URLOpenBlockingStreamURLOpenBlockingStream*
*



Contents  *



Index  *Topic Contents
*Previous Topic: UrlMkSetSessionOption
*Next Topic: URLOpenPullStream

URLOpenBlockingStream

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

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.

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
String containing the URL to be converted to a stream object. Cannot be 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. Can be set to NULL.

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.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.