[This is preliminary documentation and subject to change.]
The Next method positions the IEnumCERTVIEWATTRIBUTE object to the next attribute.
[VB] Long Next();
[JAVA] int Next();
[C++] HRESULT Next(
LONG *pIndex // out
);
[VB][JAVA] The return value is the index value of the next attribute that will be referenced by the IEnumCERTVIEWATTRIBUTE object. If there are no more attributes to enumerate, the return value will be – 1.
[C++] The return value is an HRESULT. A value of S_OK indicates success and that the next attribute is now being referenced by the IEnumCERTVIEWATTRIBUTE object. If there are no more attributes, S_FALSE is returned, and pIndex will point to a value of – 1.
Upon successful completion of this function, the IEnumCERTVIEWATTRIBUTE object will reference the next attribute. When the attribute is referenced, the attribute name and value can be accessed through the IEnumCERTVIEWATTRIBUTE methods GetName and GetValue.
LONG Index;
HRESULT hr;
BSTR bstrAttribName = NULL;
// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
while ( S_FALSE != pEnumAttr->Next( &Index ) )
{
// retrieve the attribute name
hr = pEnumAttr->GetName( &bstrAttribName );
if ( FAILED( hr ) )
printf("Failed GetName - %x\n", hr );
else
printf("Attribute name: %S\n", bstrAttribName );
}
// free resources
if ( NULL != bstrAttribName )
SysFreeString( bstrAttribName );
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in certview.h.
Import Library: Use certidl.lib.
IEnumCERTVIEWATTRIBUTE::GetName, IEnumCERTVIEWATTRIBUTE::GetValue, IEnumCERTVIEWATTRIBUTE::Skip, IEnumCERTVIEWATTRIBUTE::Reset