返回用户首选项,例如选项使用、缩进大小和小部件边距显示一个视图、框架和语言服务的。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
Function GetUserPreferences ( _
<OutAttribute> pViewPrefs As VIEWPREFERENCES(), _
<OutAttribute> pFramePrefs As FRAMEPREFERENCES(), _
<OutAttribute> pLangPrefs As LANGPREFERENCES(), _
<OutAttribute> pColorPrefs As FONTCOLORPREFERENCES() _
) As Integer
int GetUserPreferences(
VIEWPREFERENCES[] pViewPrefs,
FRAMEPREFERENCES[] pFramePrefs,
LANGPREFERENCES[] pLangPrefs,
FONTCOLORPREFERENCES[] pColorPrefs
)
int GetUserPreferences(
[OutAttribute] array<VIEWPREFERENCES>^ pViewPrefs,
[OutAttribute] array<FRAMEPREFERENCES>^ pFramePrefs,
[InAttribute] [OutAttribute] array<LANGPREFERENCES>^ pLangPrefs,
[InAttribute] [OutAttribute] array<FONTCOLORPREFERENCES>^ pColorPrefs
)
abstract GetUserPreferences :
pViewPrefs:VIEWPREFERENCES[] byref *
pFramePrefs:FRAMEPREFERENCES[] byref *
pLangPrefs:LANGPREFERENCES[] byref *
pColorPrefs:FONTCOLORPREFERENCES[] byref -> int
function GetUserPreferences(
pViewPrefs : VIEWPREFERENCES[],
pFramePrefs : FRAMEPREFERENCES[],
pLangPrefs : LANGPREFERENCES[],
pColorPrefs : FONTCOLORPREFERENCES[]
) : int
参数
pViewPrefs
类型:array<Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[][out] 查看首选项的指针。 有关 pViewPrefs的更多信息,请参见VIEWPREFERENCES。
pFramePrefs
类型:array<Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[][out] 对框架首选项的指针。 有关 pFramePrefs的更多信息,请参见FRAMEPREFERENCES。
pLangPrefs
类型:array<Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[][in, out] 对语言首选项的指针。 有关 pLangPrefs的更多信息,请参见LANGPREFERENCES。
pColorPrefs
类型:array<Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[][in, out] 对字体颜色的喜好的指针。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr.idl:
HRESULT IVsTextManager::GetUserPreferences(
[out] VIEWPREFERENCES * pViewPrefs,
[out] FRAMEPREFERENCES * pFramePrefs,
[in, out] LANGPREFERENCES * pLangPrefs,
[in, out] FONTCOLORPREFERENCES * pColorPrefs
);
使用此方法来确定视图、框架、语言、字体和颜色的喜好问题。 在 GUID 的通过相应的项和方法的返回这些首选项加载的结构。 在每个结构的 GUID 不要求您通过,如果您只需要一个项目的首选项 (例如,您希望视图首选项)。 将在不要加载的结构的 nullnull 引用(在 Visual Basic 中为 Nothing) 。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。