IDebugEnumField::GetStringFromValue

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This method obtains the name of the enumeration constant given its value.

Syntax

HRESULT GetStringFromValue(
   ULONGLONG value,
   BSTR*     pbstrValue
);
int GetStringFromValue(
   ulong      value,
   out string pbstrValue
);

Parameters

value
[in] The value for which to get the name of the enumeration constant.

pbstrValue
[out] Returns the name of the enumeration constant.

Return Value

If successful, returns S_OK; otherwise, returns S_FALSE if the value has no associated name, or returns an error code.

Remarks

If there is more than one name associated with the same value, the first name defined in the enumeration will be returned.

See also