ICertView::OpenView method (certview.h)
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
[out] ppenum
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
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | certview.h (include Certsrv.h) |
Library | Certidl.lib |
DLL | Certadm.dll |