IEnumCERTVIEWATTRIBUTE::Clone method (certview.h)

The Clone method creates a copy of the attribute-enumeration sequence object in its current state.

Syntax

HRESULT Clone(
  [out] IEnumCERTVIEWATTRIBUTE **ppenum
);

Parameters

[out] ppenum

A pointer to a pointer of IEnumCERTVIEWATTRIBUTE type. This function will fail if ppenum is NULL.

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 a cloned attribute-enumeration sequence object.

Remarks

The attribute-enumeration sequence object is obtained by a call to the IEnumCERTVIEWROW::EnumCertViewAttribute method.

Examples

// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
IEnumCERTVIEWATTRIBUTE * pEnumAttr2 = NULL;
HRESULT    hr;
hr = pEnumAttr->Clone(&pEnumAttr2);
if (S_OK != hr)
    printf("Unable to clone IEnumCERTVIEWATTRIBUTE\n");
else
{
    // use cloned object as needed
    // ...
}
// done using cloned object, free memory
if (NULL != pEnumAttr2)
    pEnumAttr2->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

See also

IEnumCERTVIEWATTRIBUTE