ICertAdmin2::DeleteRow method

The DeleteRow method deletes a row or set of rows from a database table. The caller specifies a database table and either a row ID or an ending date.

Syntax


HRESULT DeleteRow(
  [in]   const BSTR strConfig,
  [in]   LONG Flags,
  [in]   DATE Date,
  [in]   LONG Table,
  [in]   LONG RowId,
  [out]  LONG *pcDeleted
);

Parameters

strConfig [in]

Represents a valid configuration string for the certification authority (CA) in the form COMPUTERNAME\CANAME, where COMPUTERNAME is the Certificate Services server's network name, and CANAME is the common name of the certification authority, as entered during Certificate Services setup. For information about the configuration string name, see ICertConfig.

Important  DeleteRow does not clear the internal cache when the configuration string is changed. When you change the configuration string for the CA, you must instantiate a new ICertAdmin object and call this method again with the new configuration string.

Flags [in]

If not zero, specifies whether Date applies to an expiration date or a last modified date.

This can be one of the following values.

ValueMeaning
CDR_EXPIRED

The rows being deleted have an expiration date less than Date. This flag can be used when Table is CVRC_TABLE_REQCERT or CVRC_TABLE_CRL.

CDR_REQUEST_LAST_CHANGED

The rows being deleted are for pending or denied requests, and their last modified date is less than Date. This flag can be used when Table is CVRC_TABLE_REQCERT.

 

Date [in]

Specifies an expiration date when deleting certificates or CRLs, and a last modified date when deleting certificate requests.

If this value is not zero, then RowID must be zero.

Table [in]

A LONG value that specifies the Certificate Services database table from which the rows are to be deleted.

This can be one of the following values.

ValueMeaning
CVRC_TABLE_ATTRIBUTES

The attributes table is used.

CVRC_TABLE_CRL

The certificate revocation list (CRL) table is used.

CVRC_TABLE_EXTENSIONS

The extensions table is used.

CVRC_TABLE_REQCERT

The table of pending requests, denied requests, issued certificates, and revoked certificates is used.

 

RowId [in]

Specifies the ID of the row to delete.

If this value is not zero, then Date must be zero.

pcDeleted [out]

The number of rows successfully deleted.

Return value

C++

The return value is an HRESULT. A value of S_OK indicates the method was successful, and *pcDeleted is set to the number of rows deleted.

VB

The number of rows deleted.

Remarks

RowID and Date are mutually exclusive; one and only one of them can be nonzero.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certadm.h (include Certsrv.h)

Library

Certidl.lib

DLL

Certadm.dll

IID

IID_ICertAdmin2 is defined as f7c3ac41-b8ce-4fb4-aa58-3d1dc0e36b39

See also

ICertAdmin2
ICertAdmin
CCertAdmin

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.