IRowsetView::GetView

Returns a new view describing conditions applied to the specified chapter.

HRESULT GetView (
   HCHAPTER      hChapter,
   REFIID            riid,
   HCHAPTER *   phChapterSource,
   IUnknown **      ppView);

Parameters

hChapter

[in]
The chapter from which to return the view conditions.

riid

[in]
The IID of the interface on which to return a pointer.

phChapterSource

[out]
The chapter handle to which the view was applied to create the new chapter.

ppView

[out]
A pointer to memory in which to return the interface pointer. If GetView fails, it must attempt to set *ppView to a null pointer.

Return Code

S_OK
The method succeeded.

E_FAIL
A provider-specific error occurred.

E_NOINTERFACE
The view did not support the interface specified in riid.

E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the view information.

DB_E_BADCHAPTER
hChapter was invalid.

Comments

GetView returns a new view on which the consumer representing the view conditions applied to the specified chapter. The consumer can call methods such as GetFilter and GetSort in order to determine the filter and sort conditions applied to the chapter when created.

The view returned is not the same view as was used when the view was created; it simply returns the same view conditions. Therefore, if the consumer has changed or released the original view after creating the chapter, it has no effect on the view returned by this method.

The consumer must call Release in order to release the returned view when it is no longer needed.