Compartir a través de


IVsLanguageInfo.GetColorizer(IVsTextLines, IVsColorizer) Method

Definition

Returns the colorizer.

public:
 int GetColorizer(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorizer ^ % ppColorizer);
public:
 int GetColorizer(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorizer ^ &  ppColorizer);
int GetColorizer(Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & pBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsColorizer const & & ppColorizer);
public int GetColorizer (Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, out Microsoft.VisualStudio.TextManager.Interop.IVsColorizer ppColorizer);
abstract member GetColorizer : Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * IVsColorizer -> int
Public Function GetColorizer (pBuffer As IVsTextLines, ByRef ppColorizer As IVsColorizer) As Integer

Parameters

pBuffer
IVsTextLines

[in] The IVsTextLines interface for the requested colorizer.

ppColorizer
IVsColorizer

[out] Returns an IVsColorizer object.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsLanguageInfo::GetColorizer(  
   [in] IVsTextLines *pBuffer,   
   [out] IVsColorizer **ppColorizer  
);  

This method can return an interface on the language info object itself, or on new objects. The method would return an interface on new objects, for example, if the colorizer for the language needs state information on a per-file basis.

The colorizer is used for syntax coloring and can be used for quick identification of tokens on a line.

Applies to