Partager via


IViewFilter::GetFilterBindings

Retrieves the bindings used to describe the filter conditions associated with a view.

Syntax

HRESULT GetFilterBindings(
   DBCOUNTITEM   *pcBindings,
   DBBINDING    **prgBindings);

Parameters

  • pcBindings
    [out] A pointer to memory in which to return the number of bindings used to describe the filter criteria. If this method fails or if no filter has been applied to the view, *pcBindings is set to zero.

  • prgBindings
    [out] A pointer to memory in which to return an array of DBBINDING structures. One structure is returned for each binding used to describe the filter criteria. The provider allocates memory for the structures and returns the address to this memory; the consumer releases this memory with IMalloc::Free when it no longer needs the bindings. If *pcBindings is zero on output or the method fails, the provider does not allocate any memory and ensures that *prgBindings is a null pointer on output. For information about bindings, see DBBINDING Structures.

Return Code

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

  • E_INVALIDARG
    pcBindings or prgBindings was a null pointer.

  • E_OUTOFMEMORY
    The provider was unable to allocate sufficient memory in which to return the binding structures.

Comments

The consumer calls IViewFilter::GetFilterBindings to retrieve information about the columns bound in the current filter. The consumer can use this information in order to create an accessor to be passed into IViewFilter::GetFilter to retrieve the information describing the filter conditions.