ICertView2::OpenView method

The OpenView method opens a view to a Certificate Services database and instantiates an instance of an IEnumCERTVIEWROW object.

Syntax


HRESULT OpenView(
  [out]  IEnumCERTVIEWROW **ppenum
);

Parameters

ppenum [out]

A pointer to a pointer of IEnumCERTVIEWROW type.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

The return value is an IEnumCERTVIEWROW object.

Remarks

Before calling the OpenView method, it is necessary to establish a connection with a Certificate Services server by calling the OpenConnection method first.

The IEnumCERTVIEWROW object returned by this call represents a row-enumeration sequence whose internal index is pointing to the beginning of the sequence. To look at the first row in the sequence, call the IEnumCERTVIEWROW::Next method, which moves the internal index to the first row.

To view a nondefault column set or a subset of the rows, call SetResultColumnCount, SetResultColumn, and SetRestriction after calling OpenConnection and before calling OpenView.

Examples


// pCertView is previously instantiated pointer to ICertView.
IEnumCERTVIEWROW * pEnumRow = NULL;
HRESULT    hr;

hr = pCertView->OpenView(&pEnumRow);
if (S_OK != hr)
    printf("Failed ICertView::OpenView - %x\n", hr);
else
    // use pEnumRow as needed, to enumerate data rows
    // ...
// Done processing, free resources.
if (NULL != pEnumRow)
    pEnumRow->Release();

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certview.h (include Certsrv.h)

Library

Certidl.lib

DLL

Certadm.dll

IID

IID_ICertView2 is defined as d594b282-8851-4b61-9c66-3edadf848863

See also

ICertView2
ICertView
ICertView::OpenConnection
IEnumCERTVIEWROW
IEnumCERTVIEWROW::Next

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.