ICertView::SetResultColumn

[This is preliminary documentation and subject to change.]

The SetResultColumn method specifies a column for use in a customized view of the Certificate Server database.

[VB] SetResultColumn(
  Long iCol
);
 
[JAVA] SetResultColumn(
  int iCol
);
 
[C++] HRESULT SetResultColumn(
  LONG iCol   // in
);
 

Parameters

iCol
Zero-based index of a column to include in the view's result set. Prior to calling the ICertView SetResultColumn method, it is necessary to call the ICertView SetResultColumnCount method in order to specify the number of columns in the result set.

Return Values

[C++] The return value is an HRESULT. A value of S_OK indicates success.

Remarks

Upon successful completion of this function, the column specified by iCol will be included in the view's result set.

The ICertView SetResultColumnCount method must be called prior to calling SetResultColumn. After the caller has specified which columns are included in the result set via calls to SetResultColumn, the ICertView OpenView method can be called to retrieve a row enumerator for the result set. (Optionally, before calling OpenView, the caller can specify sorting/qualifying criteria through calls to the ICertView SetRestriction method.)

This function will fail if the ICertView SetResultColumnCount method has been called with a parameter value of CV_COLUMN_LOG_DEFAULT or CV_COLUMN_QUEUE_DEFAULT. This function will fail if the caller attempts to include more columns in the result set than has been specified in the call to the ICertView SetResultColumnCount method.

Example

// pCertView is pointer to ICertView
HRESULT    hr;
LONG       nIndex;
LONG       i;

// determine number of columns in the entire database
hr = pCertView->GetColumnCount( FALSE, &nIndex );
if (FAILED( hr ) )
{
    printf("Failed GetColumnCount - %x\n", hr);
    goto error;
}
hr = pCertView->SetResultColumnCount( nIndex );
if (FAILED( hr ) )
{
    printf("Failed SetResultColumnCount - %x\n", hr);
    goto error;
}
// place each column in the view
for ( i = 0; i < nIndex; i++)
{
    hr = pCertView->SetResultColumn(i);
    if ( FAILED(hr ) )
    {
        printf("Failed SetResultColumn (%d) - %x\n", i, hr );
        goto error;
    }
}
// call ICertView::OpenView, etc
// ...

error:
// clean up resources, etc
 

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in certview.h.
  Import Library: Use certidl.lib.

See Also

ICertView::SetResultColumnCount