Compartir a través de


IVsTextManager.MapFilenameToLanguageSID (Método)

Dado un nombre de archivo, determina el servicio de lenguaje registrado, si existe, que lo entiende.

Espacio de nombres:  Microsoft.VisualStudio.TextManager.Interop
Ensamblado:  Microsoft.VisualStudio.TextManager.Interop (en Microsoft.VisualStudio.TextManager.Interop.dll)

Sintaxis

'Declaración
Function MapFilenameToLanguageSID ( _
    pszFileName As String, _
    <OutAttribute> ByRef pguidLangSID As Guid _
) As Integer
int MapFilenameToLanguageSID(
    string pszFileName,
    out Guid pguidLangSID
)
int MapFilenameToLanguageSID(
    [InAttribute] String^ pszFileName, 
    [OutAttribute] Guid% pguidLangSID
)
abstract MapFilenameToLanguageSID : 
        pszFileName:string * 
        pguidLangSID:Guid byref -> int
function MapFilenameToLanguageSID(
    pszFileName : String, 
    pguidLangSID : Guid
) : int

Parámetros

  • pszFileName
    Tipo: String

    [in] Nombre de archivo asociado al servicio de lenguaje.

  • pguidLangSID
    Tipo: Guid%

    [out] Puntero al servicio de lenguaje.

Valor devuelto

Tipo: Int32
si el método tiene éxito, devuelve S_OK.Si se produce un error, devuelve un código de error.

Comentarios

Prototipo COM

de textmgr.idl:

HRESULT IVsTextManager::MapFilenameToLanguageSID(
   [in] const WCHAR *pszFileName,
   [out] GUID *pguidLangSID
);

Este método permite que asigne un tipo de archivo al servicio de lenguaje adecuado para ese tipo. Esta asignación funciona buscando en “HKEY_LOCAL_MACHINE \ Software\Microsoft\Languages\File Extensions" for entries that map an extension to a SID, that is, a CLSID para un servicio de lenguaje que implemente probablemente IVsLanguageInfo.

Seguridad de .NET Framework

Vea también

Referencia

IVsTextManager Interfaz

Microsoft.VisualStudio.TextManager.Interop (Espacio de nombres)