ICertView2::SetResultColumnCount method

The SetResultColumnCount method specifies the maximum number of columns for the result set of a customized view of the Certificate Services database.

Syntax


HRESULT SetResultColumnCount(
  [in] LONG cResultColumn
);

Parameters

cResultColumn [in]

Specifies the maximum number of columns in the result set. This parameter can be set to a positive number, or to zero if you are only interested in counting the rows of the Certificate Services database, or to one of the following constants.

ValueMeaning
CV_COLUMN_LOG_DEFAULT

The number of columns in the result set will be the number of columns in the Certificate Services's default result set for requests that have been resolved. A request is resolved if it has resulted in an issued certificate or a failed request; revoked certificates are considered resolved.

CV_COLUMN_LOG_FAILED_DEFAULT

The number of columns in the result set will be the number of columns in the Certificate Services's default result set for requests that have failed.

CV_COLUMN_QUEUE_DEFAULT

The number of columns in the result set will be the number of columns in the Certificate Services's default result set for requests that have not been resolved.

 

Return value

VB

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.

Remarks

Before calling the SetResultColumnCount method, it is necessary to establish a connection with a Certificate Services server by calling the OpenConnection method first. After the connection is established, this method can be called once, and only once, to specify the maximum number of columns in the result set.

If the cResultColumn parameter is set to a positive number (not one of the predefined constants), the SetResultColumn method must be called to specify which columns to include in the result set. Note that SetResultColumn fails if it is called more than the number of columns specified by SetResultColumnCount.

Examples


HRESULT    hr;
// Specify the result set for logged requests.
// pCertView is pointer to ICertView (which has an Open Connection)
hr = pCertView->SetResultColumnCount(CV_COLUMN_LOG_DEFAULT);
if (S_OK != hr)
    printf("Failed ICertView::SetResultColumnCount - %x\n", hr);
else
{
    // Retrieve data rows by means of ICertView::OpenView.
    // ...
}

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
ICertView::SetRestriction
ICertView::SetResultColumn

 

 

Show: