Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method provides data to the client as it becomes available during asynchronous bind operations.
Syntax
HRESULT OnDataAvailable( DWORD grfBSCF, DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed ); |
Parameters
- grfBSCF
-
[in] Unsigned long integer value taken from the BSCFenumeration that indicates the kind of data available.
- dwSize
-
[in] Unsigned long integer value that contains the size, in bytes, of the total data available from the current bind operation.
- pformatetc
-
[in] Address of the FORMATETCstructure that indicates the format of the available data. This parameter is used when the bind operation is caused by the IMoniker::BindToStoragemethod. If there is no format associated with the available data, pformatetcmight contain CF_NULL. Each different call to IBindStatusCallback::OnDataAvailablecan pass in a new value for this parameter, although they all should always point to the same data.
- pstgmed
-
[in] Address of the STGMEDIUMstructure that contains the pointers to the interfaces, such as IStreamand IStorage, that can be used to access the data. In the asynchronous case, client applications might have received a second pointer to the IStreamor IStorageinterface from the IMoniker::BindToStoragemethod, on which the client application must call Releaseto avoid memory leaks.
Return Value
Returns S_OK if this is successful or E_INVALIDARG if one or more parameters are invalid.
Remarks
During asynchronous IMoniker::BindToStoragebind operations, an asynchronous moniker calls this method to provide data to the client as it becomes available.
Be aware that the behavior of the storage returned in pstgmeddepends on the BINDFflags returned in the IBindStatusCallback::GetBindInfomethod. This storage can be asynchronous or blocking, and the bind operation can follow a data pull model or a data push model. Moreover, realize that for BINDFbind operations, you cannot seek backward into data streams provided in IBindStatusCallback::OnDataAvailable. On the other hand, for data push model bind operations, it is usually possible to seek back into a data stream and read any data that was downloaded for an ongoing IMoniker::BindToStorageoperation.
Requirements
Header | urlmon.h, urlmon.idl |
Library | urlmon.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |