IUrlAccessor2::BindToStream Method

Binds the item being processed to a data stream and returns a pointer to that stream to the Filter Host.

Syntax

HRESULT BindToStream(      
    IStream **ppStream
);

Parameters

  • ppStream
    [out]  Returns the address of a pointer to the IStream that contains the contents of the item represented by the URL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method is less efficient than direct file access because it creates a temporary file. If direct file access is available, methods IUrlAccessor::GetFileName and IUrlAccessor::BindToFilter should be implemented.

All protocol handlers must implement one of IUrlAccessor::BindToFilter, IUrlAccessor::BindToStream, or IUrlAccessor::GetFileName methods for the Filter Daemon to retrieve any useful information from an item. Protocol handlers may implement either IUrlAccessor::BindToFilter or IUrlAccessor::BindToStream or they may implement both. For example, protocol handlers may use IUrlAccessor::BindToFilter for metadata associated with items in the content source, and use IUrlAccessor::BindToStream to retrieve the content of the items.

See Also

IUrlAccessor::GetFileName