IVsTextManager2.SetUserPreferences2 Method
Sets user preferences.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
Syntax
'宣言
Function SetUserPreferences2 ( _
pViewPrefs As VIEWPREFERENCES2(), _
pFramePrefs As FRAMEPREFERENCES2(), _
pLangPrefs As LANGPREFERENCES2(), _
pColorPrefs As FONTCOLORPREFERENCES2() _
) As Integer
'使用
Dim instance As IVsTextManager2
Dim pViewPrefs As VIEWPREFERENCES2()
Dim pFramePrefs As FRAMEPREFERENCES2()
Dim pLangPrefs As LANGPREFERENCES2()
Dim pColorPrefs As FONTCOLORPREFERENCES2()
Dim returnValue As Integer
returnValue = instance.SetUserPreferences2(pViewPrefs, _
pFramePrefs, pLangPrefs, pColorPrefs)
int SetUserPreferences2(
VIEWPREFERENCES2[] pViewPrefs,
FRAMEPREFERENCES2[] pFramePrefs,
LANGPREFERENCES2[] pLangPrefs,
FONTCOLORPREFERENCES2[] pColorPrefs
)
int SetUserPreferences2(
[InAttribute] array<VIEWPREFERENCES2>^ pViewPrefs,
[InAttribute] array<FRAMEPREFERENCES2>^ pFramePrefs,
[InAttribute] array<LANGPREFERENCES2>^ pLangPrefs,
[InAttribute] array<FONTCOLORPREFERENCES2>^ pColorPrefs
)
function SetUserPreferences2(
pViewPrefs : VIEWPREFERENCES2[],
pFramePrefs : FRAMEPREFERENCES2[],
pLangPrefs : LANGPREFERENCES2[],
pColorPrefs : FONTCOLORPREFERENCES2[]
) : int
Parameters
pViewPrefs
Type: [][in] Values that describe the desired default view flags for all editor views. For more information, see VIEWPREFERENCES2. Can be a null reference (Nothing in Visual Basic) if view preferences are not being set.
pFramePrefs
Type: [][in] Values that describe the desired default flags for all editor frames. For more information, see FRAMEPREFERENCES2. Can be a null reference (Nothing in Visual Basic) if frame preferences are not being set.
pLangPrefs
Type: [][in] Values that describe the desired flags for the language specified in the structure. For more information, see LANGPREFERENCES2. Can be a null reference (Nothing in Visual Basic) if language preferences are not being set.
pColorPrefs
Type: [][in] Values that describe the color and font preferences for all editor views. This parameter is for internal editor use only. Should be a null reference (Nothing in Visual Basic) when this method is called by external packages. For more information, see FONTCOLORPREFERENCES2.
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 IVsTextManager2::SetUserPreferences2(
[in] const VIEWPREFERENCES2 * pViewPrefs,
[in] const FRAMEPREFERENCES2 * pFramePrefs,
[in] const LANGPREFERENCES2 * pLangPrefs,
[in] const FONTCOLORPREFERENCES2 * pColorPrefs
);
Permissions
- 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.