3.1.4.1.13 ICertAdminD::EnumView (Opnum 15)

The EnumView method returns a set of resultant row data for the opened view.

 HRESULT EnumView(
   [in, string, unique] wchar_t const* pwszAuthority,
   [in] DWORD ielt,
   [in] DWORD celt,
   [out] DWORD* pceltFetched,
   [out, ref] CERTTRANSBLOB* pctbResultRows
 );

pwszAuthority: See the definition of the pwszAuthority parameter in section 3.1.4.1.1.

ielt: An unsigned integer value that specifies the identifier of the first row to return from the resultant set of rows.

celt: An unsigned integer value that specifies the requested count of the row data to be returned from the resultant set of rows.

pceltFetched: A pointer to an unsigned integer value that receives the actual count of row data that is returned by the server in the pctbResultRows parameter.

pctbResultRows: A pointer to a CERTTRANSBLOB structure. The pb byte array of the CERTTRANSBLOB structure MUST contain (on successful return) an array of n marshaled CERTTRANSDBRESULTROW structures (section 2.2.3), where n is the value returned in pceltFetched. Each CERTTRANSDBRESULTROW contains one or more CERTTRANSDBRESULTCOLUMN structures (section 2.2.1.10). In addition, an extra CERTTRANSDBRESULTROW structure is included in the array when the server encounters the end of the enumeration, as described in the following rules.

The CA server MUST enforce the following sequencing rules:

  1. If the EnumView method is called when the value of Config_Database_View_Open is False, the server MUST return an error. The error code SHOULD be ERROR_INVALID_HANDLE.

  2. If the EnumView method is called when the value of Config_Database_View_Open is True, the server MUST continue with the following processing rules.

  3. The CA server MUST use the resultant set of rows as obtained via the OpenView method call.

  4. The CA server MUST use the value of ielt as an index to this resultant set of rows.

  5. The number of resultant rows returned MUST be a minimum of the celt parameter value and the remaining number of rows in the set (starting from ielt). The value of the *pceltFetched parameter MUST be set to the number of resultant rows returned.

  6. When the server encounters the end of the enumeration, the server MUST add an extra CERTTRANSDBRESULTROW structure at the end of the array.

    • The count returned in pceltFetched MUST NOT include the extra CERTTRANSDBRESULTROW structure. The rowid field for the extra CERTTRANSDBRESULTROW structure MUST be set to the total row count, and the ccol field MUST be set to its bitwise inverse.

  7. The rules for marshaling a CERTTRANSDBRESULTROW into a CERTTRANSBLOB are described in section 2.2.3.1. The rules for marshaling a CERTTRANSDBRESULTCOLUMN into a CERTTRANSBLOB are described in section 2.2.1.10.1.