BindToStream Method

The BindToStream method binds the item being processed to a data stream and returns a pointer to that stream to the Filter Daemon.

Syntax
HRESULT BindToStream(
  IStream**ppStream);
Parameters
  • ppStream
    [out] Address of a pointer to an IStream that contains the contents of the item represented by the URL.
Return Value

For a list of error messages returned by SharePoint Portal Server Protocol Handlers, see Error Messages.

Remarks

All protocol handlers must implement BindToFilter, BindToStream, or GetFilename methods for the Filter Daemon to retrieve any useful information from that item. Protocol handlers may implement either BindToFilter or BindToStream. They may implement both. For example, using BindToFilter for metadata associated with items in the content source, and use BindToStream to retrieve the content of the items.

It is sufficient for this method to implement simple sequential access to a Stream object. Reading from a stream may result in a temporary file being generated. If this impacts the performance of your protocol handler implementation, consider using the BindToFilter and GetFileName methods to access the item content.

Example

To see this method in a fuller context, see Protocol Handler Sample.