ITableData::HrGetView
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Creates a table view, returning a pointer to an IMAPITable implementation.
HRESULT HrGetView(
LPSSortOrderSet lpSSortOrderSet,
CALLERRELEASE FAR * lpfCallerRelease,
ULONG ulCallerData,
LPMAPITABLE FAR * lppMAPITable
);
Parameters
lpSSortOrderSet
[in] A pointer to a sort order structure that describes the sort order for the table view. If NULL is passed in the lpSSortOrderSet parameter, the view is not sorted.lpfCallerRelease
[in] A pointer to a callback function based on the CALLERRELEASE prototype that MAPI calls when it releases the view. If NULL is passed in the lpfCallerRelease parameter, no function is called on release of the view.ulCallerData
[in] The data that must be saved with the new view and passed to the callback function pointed to by lpfCallerRelease.lppMAPITable
[out] A pointer to a pointer to the newly created view.
Return Value
- S_OK
The view was successfully created.
Remarks
The ITableData::HrGetView method creates a read-only view of the data in the table, sorted in the order pointed to by the lpSSortOrderSet parameter. The cursor is placed at the beginning of the first row in the view. An IMAPITable interface implementation for accessing the view is returned.
Service providers call HrGetView when they need to give a client access to a table. HrGetView creates the view and returns the IMAPITable pointer. Service providers in turn pass the pointer on to the client. When the client is finished using the table and calls its IUnknown::Release method, HrGetView calls the callback function pointed to by the lpfCallerRelease parameter.
If a service provider needs to return to a client a view that has a customized column set or a restriction, the provider can call the view's IMAPITable::SetColumns and IMAPITable::Restrict methods before allowing the client access.