Using the ICertView Interface

[This is preliminary documentation and subject to change.]

The ICertView interface is used by properly authorized clients to view the Certificate Server database.

A properly authorized client is a user who is a member of the Certificate Server Administrators group. Additionally, to use the ICertView object, the client workstation is required to have installed the Certificate Server client components.

Although there are various scenarios for using ICertView and its related interfaces, the following depicts one possible sequence for developing a client application based on ICertView.

  1. After obtaining an instance of the ICertView object, call OpenConnection to communicate with a Certificate Authority on a specific computer.
  2. Call SetResultColumnCount to specify the number of columns in the view; SetResultColumnCount can also be used to specify a default view. If a default view is not specified in the call to SetResultColumnCount, the caller must call SetResultColumn for each of the columns to be contained in the view.
  3. Optional. Specify sorting criteria and/or qualifying critieria for the database query by calling the SetRestriction function. Qualifying criteria consists of informing the view to retrieve data based on qualifiers such as Greater Than, Less Than, Equal To, and so on.
  4. Call OpenView to retrieve the data in the view; the view's data will consist of the columns requested via the use of SetResultColumnCount (and if a default view wasn't specified, SetResultColumn). If SetRestriction was called, data in the columns will be sorted and/or qualified. OpenView creates a IEnumCERTVIEWROW object, which can be used to enumerate the view's rows.
  5. Use the IEnumCERTVIEWROW methods EnumCertViewAttribute, EnumCertViewColumn, and EnumCertViewExtension to retrieve attribute, column, and extension data as desired.