Partilhar via


Método IVsTextManager.GetUserPreferences

Retorna as preferências do usuário, como o uso do guia, recua a presença de margem de tamanho e o widget para o serviço de modo de exibição, o quadro e o idioma.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (em Microsoft.VisualStudio.TextManager.Interop.dll)

Sintaxe

'Declaração
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

Parâmetros

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De textmgr.idl:

HRESULT IVsTextManager::GetUserPreferences(
   [out] VIEWPREFERENCES * pViewPrefs,
   [out] FRAMEPREFERENCES * pFramePrefs,
   [in, out] LANGPREFERENCES * pLangPrefs,
   [in, out] FONTCOLORPREFERENCES * pColorPrefs
);

Use esse método para determinar o modo de exibição, quadro, idioma, fontes e cores de preferências. Passar o GUID para o item apropriado e o método retorna a estrutura preenchida para essas preferências. Você não precisa passar um GUID para cada estrutura se desejar apenas preferências para um item (por exemplo, você apenas deseja preferências de exibição). Passar no nulluma referência nula (Nothing no Visual Basic) para as estruturas que você deseja preencher.

Segurança do .NET Framework

Consulte também

Referência

IVsTextManager Interface

Namespace Microsoft.VisualStudio.TextManager.Interop