IEnumCERTVIEWATTRIBUTE::Next method (certview.h)
The Next method moves to the next attribute in the attribute-enumeration sequence.
Syntax
HRESULT Next(
[out] LONG *pIndex
);
Parameters
[out] pIndex
A pointer to a variable that contains the index value of the next attribute being referenced. If there are no more attributes to enumerate, this variable is set to –1. This method fails if pIndex is NULL.
Return value
C++
If the method succeeds, the method returns S_OK and the next attribute is now being referenced by the attribute-enumeration sequence. If there are no more attributes, the method returns S_FALSE, and pIndex is set to a value of –1.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 the index value of the attribute that is now referenced by the attribute-enumeration sequence. If there are no more attributes to enumerate, the return value is –1.Remarks
Upon successful completion of this method, the attribute name and value can be accessed through the following methods:
Examples
LONG Index;
HRESULT hr;
BSTR bstrAttribName = NULL;
// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
while (S_OK == pEnumAttr->Next(&Index))
{
// retrieve the attribute name
hr = pEnumAttr->GetName(&bstrAttribName);
if (FAILED(hr))
printf("Failed GetName - %x\n", hr );
else
printf("Attribute name: %ws\n", bstrAttribName);
}
// Free resources.
if (NULL != bstrAttribName)
SysFreeString(bstrAttribName);
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::GetName