获取属性列表对象中。
命名空间: Microsoft.VisualStudio.Designer.Interfaces
程序集: Microsoft.VisualStudio.Designer.Interfaces(在 Microsoft.VisualStudio.Designer.Interfaces.dll 中)
语法
声明
Sub GetPropertyAttributes ( _
dispid As Integer, _
<OutAttribute> ByRef pceltAttrs As UInteger, _
<OutAttribute> ppbstrTypeNames As IntPtr, _
<OutAttribute> ppvarAttrValues As IntPtr _
)
void GetPropertyAttributes(
int dispid,
out uint pceltAttrs,
IntPtr ppbstrTypeNames,
IntPtr ppvarAttrValues
)
参数
- dispid
类型:System.Int32
属性调度 ID 来检索属性。
- pceltAttrs
类型:System.UInt32%
特性类型名称的数字。 pbstrTypeNames. 的。
- ppbstrTypeNames
类型:System.IntPtr
要使用的变量初始化特定特性。如果特性具有参数的构造函数,特定属性将用于初始化属性。
- ppvarAttrValues
类型:System.IntPtr
如果该初始值设定项为空, VT_EMPTY 或 VT_NULL,默认 ctor 将调用。变量是使用不同于数组的清除,然后 CoTaskMemFree 单个可用的调用方。
备注
pbstrTypeNames 是属性类型名称,例如 System.ComponentModel.BrowsableAttribute 或 System.ComponentModel.DescriptionAttribute。名称可以是从 Attribute派生的任何类型的名称。数组是被调用方 llocated 和被调用方释放使用 CoTaskMemFree。字符串释放与 SysFreeString。
如果类型名称是静态实例名称,如 System.ComponentModel.BrowsableAttribute.No,初始值设定项值被忽略。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。