IEnumCERTVIEWATTRIBUTE::GetName

[This is preliminary documentation and subject to change.]

The GetName method retrieves the name of the attribute.

[VB] String GetName();
 
[JAVA] Java.lang.String GetName();
 
[C++] HRESULT GetName(
  BSTR *pstrOutName  // out
);
 

Parameters

[C++] pstrOutName
Pointer to a variable of BSTR type that will contain the name of the attribute. This function will fail if pstrOutName is NULL.. It is the caller's responsibility to call SysFreeString when done with pstrOutName.

Return Values

[VB][JAVA] The return value is a String representing the name of the attribute.

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

Remarks

This function is used to retrieve the name of the attribute currently referenced by the IEnumCERTVIEWATTRIBUTE object.

If the IEnumCERTVIEWATTRIBUTE object is not referencing a valid attribute, GetName will fail. Use the IEnumCERTVIEWATTRIBUTE Next method to reference a valid attribute.

Example

BSTR    bstrAttribName = NULL;

// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
hr = pEnumAttr->GetName(&bstrAttribName);
if ( S_OK != hr )
    printf("Failed call to GetName - %x\n", hr);
else
    printf("Attribute name is %S\n", bstrAttribName );

// free memory when done
if ( NULL != bstrAttribName )
    SysFreeString( bstrAttribName );
 

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

IEnumCERTVIEWATTRIBUTE::GetValue