Retrieves the bindings used to describe the filter conditions associated with a view.
HRESULT GetFilterBindings(
ULONG * pcBindings,
DBBINDING ** prgBindings);
Parameters
cBindings
[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.
rgBindings
[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" in Chapter 6.
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 in order 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 in order to retrieve the information describing the filter conditions.