IFilter::BindRegion

[This is preliminary documentation and subject to change.]

SCODE IFilter::BindRegion ( FILTERREGION origPos, 
                            REFIID iid
                            void ** ppunk );
 

BindRegion is used to retrieve an interface representing the specified portion of the object. This method is for future use, for example, to enable document viewing.

A FILTERREGION structure is filled in to describe the position of the text. The structure is defined as:

typedef struct tagFILTERREGION
{
    ULONG idChunk;
    ULONG cwcStart;
    ULONG cwcExtent;
} FILTERREGION;
 

If cwcExtent characters beginning at offset cwcStart in chunk idChunk extends beyond the end of the chunk then the continuation should be in the next chunk with an identical attribute. If this operation is impossible then FILTER_W_REGION_CLIPPED should be returned. This situation arises when the next identical chunk is in a link or embedding.

It is acceptable not to implement BindRegion and return E_NOTIMPL. Not all filters are capable of supporting this method in a rational way. Filters which are implemented by viewing applications benefit the most from IFilter::BindRegion.