返回一个名为显示项目的用户可修改的信息在当前打开的类别。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
Function GetItem ( _
szName As String, _
<OutAttribute> pInfo As ColorableItemInfo() _
) As Integer
int GetItem(
string szName,
ColorableItemInfo[] pInfo
)
参数
- szName
类型:System.String
[in] 包含显示项目的非本地化名称以 null 终止的字符串在当前打开的类别。
- pInfo
类型:array<Microsoft.VisualStudio.Shell.Interop.ColorableItemInfo[]
[in, out] 对分配的 ColorableItemInfo 对象在当前打开的类别包含有关显示项目的信息。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell.idl:
HRESULT IVsFontAndColorStorage::GetItem(
[in] LPCOLESTR szName,
[in, out] ColorableItemInfo *pInfo
);
此方法返回的信息提供存储的字体和颜色的当前状态时激发。
是用于呈现文本的应用程序负责到 Visual Studio 环境更新其显示与此方法返回的设置。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。