Last modified: April 01, 2009

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Creates a table view, returning a pointer to an IMAPITable implementation.

  LPSSortOrderSet lpSSortOrderSet,
  CALLERRELEASE FAR * lpfCallerRelease,
  ULONG_PTR ulCallerData,


[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.


[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.


[in] The data that must be saved with the new view and passed to the callback function pointed to by lpfCallerRelease.


[out] A pointer to a pointer to the newly created view.


The view was successfully created.

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.