IVsSettingsStore.GetPropertyName(String, UInt32, String) 方法

定义

返回属性的名称。

public:
 int GetPropertyName(System::String ^ collectionPath, System::UInt32 index, [Runtime::InteropServices::Out] System::String ^ % propertyName);
int GetPropertyName(std::wstring const & collectionPath, unsigned int index, [Runtime::InteropServices::Out] std::wstring const & & propertyName);
public int GetPropertyName (string collectionPath, uint index, out string propertyName);
abstract member GetPropertyName : string * uint32 *  -> int
Public Function GetPropertyName (collectionPath As String, index As UInteger, ByRef propertyName As String) As Integer

参数

collectionPath
String

中集合的路径。

index
UInt32

中集合中属性的索引。

propertyName
String

弄属性的名称。 这应作为未初始化的 BSTR 传递。 方法分配足够的空间来容纳请求的属性的名称。 调用方应调用 SysFreeString,以便在不再需要 BSTR 时释放它。

返回

Int32

S_OK如果返回属性名称,则返回。 如果该集合不存在或者索引大于或等于子集合的数目,则该方法返回 E_INVALIDARG

注解

索引是从零开始的,因此它应小于可用属性的数目。 如果索引指示默认属性,则输出名称为空字符串。

适用于