
ReleaseBindInfo(
BINDINFO *pbindinfo
);
Release the resources used by the specified BINDINFO structure.
HRESULT RevokeBindStatusCallback(
[in] IBindCtx *pbc,
[in] IBindStatusCallback *pbsc
);
Revokes a bind status callback interface previously registered on a bind context.
| S_OK | Success. |
| E_FAIL | The callback interface specified is not registered on the specified bind context. |
| E_INVALIDARG | One or more parameters are invalid. |
This function will not succeed if it is made during a bind operation.
Note that it is not necessary to make this call for every use of a bind context. It is possible, although not recommended, to reuse the same bind context and the same callback for several bind operations. Upon calling the IUnknown::Release method, all registered objects on that bind context are revoked, including the callback interfaces. Therefore, releasing a bind context implicitly releases all registered callbacks. However, if you choose to reuse a bind context, you can use RevokeBindStatusCallback to remove a registered callback so it is not reused.
See also IBindStatusCallback, RegisterBindStatusCallback
HRESULT RevokeFormatEnumerator(
[in] LPBC pbc,
[in] IEnumFORMATETC *pEFetc
);
Removes a format enumerator from the given bind context.
This function removes a format enumerator from the bind context specified in pbc. It must previously have been registered with a call to RegisterFormatEnumerator.
Note that it is not necessary to make this call for every use of a bind context. It is possible (although not recommended) to reuse the same bind context and the same format enumerator for several bind operations. Upon calling IUnknown::Release, all registered objects on that bind context are revoked, including the format enumerator interfaces. Therefore, releasing a bind context implicitly releases all registered format enumerators. However, if you choose to reuse a bind context, you can use RevokeFormatEnumerator to remove a registered format enumerator so it is not reused.
See also RegisterFormatEnumerator
HRESULT URLDownloadToCacheFile(
LPUNKNOWN lpUnkcaller,
LPCSTR szURL,
LPTSTR szFileName,
DWORD dwBufLength,
DWORD dwReserved,
IBindStatusCallback *pBSC
);
Downloads data into the Internet cache and returns the file name of the cache location for retrieving the bits. The client can choose to be notified of progress through a notification callback.
| URLOSTRM_USECACHEDCOPY_ONLY | Only download the resource from the cache. |
| URLOSTRM_USECACHEDCOPY | Download the resource from the cache if it is available; otherwise, download it from the Internet. |
| URLOSTRM_GETNEWESTVERSION | Download the resource from the Internet, if it is newer, and store it in the cache. |
This function always returns a file name if the download operation succeeds. If the given URL is a "file:" URL, URLDownloadToCacheFile directly returns the file name for the "file:" URL rather than making a copy to the cache. If the given URL is an Internet URL ("http:", "ftp:"), URLDownloadToCacheFile downloads this file and returns the local file name of the cached copy. Using this function ensures that a file name is returned without unnecessary copying of data.
HRESULT URLDownloadToFile(
LPUNKNOWN pCaller,
LPCSTR szURL,
LPCSTR szFileName,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
Downloads bits from the Internet and saves them to a file. The client can choose to be notified of progress through a notification callback.
WINOLEAPI UrlMkGetSessionOption(
[in] DWORD dwOption,
[in] LPVOID pBuffer,
[in] DWORD dwBufferLength,
[out] DWORD *pdwBufferLength,
[in] DWORD dwReserved
);
Sets options for the current Internet session.
| S_OK | Option was successfully set. |
| E_INVALIDARG | The option is not supported. |
| E_FAIL | Unable to set the option. |
HRESULT UrlMkSetSessionOption(
[in] DWORD dwOption,
[in] LPVOID pBuffer,
[in] DWORD dwBufferLength,
[in] DWORD dwReserved
);
Sets options for the current Internet session.
| INTERNET_OPTION_PROXY | Sets the proxy settings. pBuffer must contain a INTERNET_PROXY_INFO structure. INTERNET_OPTION_PROXY and INTERNET_PROXY_INFO are defined in the wininet.h file. For more information, see the Microsoft Win32 Internet Function Reference. |
| INTERNET_OPTION_REFRESH | Sets the value that determines if the proxy information can be reread from the registry. The value TRUE indicates that the proxy information can be reread from the registry. For more information on this value, see the Microsoft Win32 Internet Function Reference. |
This function maps directly to the Windows® Internet function InternetSetOption, although UrlMkSetSessionOption allows only global options to be set.
To use this function, the client code must include the Wininet.h header file, which declares values for the dwOption parameter and structures for the pBuffer parameter.
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.
This function is synchronous and will only return after all of 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.
HRESULT URLOpenPullStream(
LPUNKNOWN pCaller,
LPCSTR szURL,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
Creates a pull type stream object from a URL.
The pull model is slightly more cumbersome than the push model, but it allows the client to control the amount of Internet access for the download.
The data is downloaded from the Internet on demand. If not enough data is available locally to satisfy the requests, the IStream::Read call will not block until enough data has arrived. Instead, IStream::Read immediately returns E_PENDING, and URLOpenPullStream requests the next packet of data from the Internet server.
HRESULT URLOpenStream(
LPUNKNOWN pCaller,
LPCSTR szURL,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
Creates a push type stream object from a URL.
The data is downloaded from the Internet as fast as possible. When data is available, it is pushed at the client through a notification callback.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.