IVsTextManager.GetUserPreferences Method
Returns the user preferences, such as tab usage, indent size and widget margin presence for the view, frame, and language service.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Déclaration
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
Parameters
- pViewPrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop.VIEWPREFERENCES[]
[out] Pointer to the view preferences. For more information about pViewPrefs, see VIEWPREFERENCES.
- pFramePrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop.FRAMEPREFERENCES[]
[out] Pointer to the frame preferences. For more information about pFramePrefs, see FRAMEPREFERENCES.
- pLangPrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop.LANGPREFERENCES[]
[in, out] Pointer to the language preferences. For more information about pLangPrefs, see LANGPREFERENCES.
- pColorPrefs
Type: array<Microsoft.VisualStudio.TextManager.Interop.FONTCOLORPREFERENCES[]
[in, out] Pointer to the font color preferences.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsTextManager::GetUserPreferences(
[out] VIEWPREFERENCES * pViewPrefs,
[out] FRAMEPREFERENCES * pFramePrefs,
[in, out] LANGPREFERENCES * pLangPrefs,
[in, out] FONTCOLORPREFERENCES * pColorPrefs
);
Use this method to determine view, frame, language, font, and color preferences. Pass in the GUID for the appropriate item and the method returns the filled structure for those preferences. You are not required to pass in a GUID for each structure if you only want preferences for one item (for example, you only want view preferences). Pass in nulla null reference (Nothing in Visual Basic) for the structures that you do not want to fill.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.