IVsLanguageInfo::GetColorizer Method (IVsTextLines^, IVsColorizer^)

 

Returns the colorizer.

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

int GetColorizer(
	IVsTextLines^ pBuffer,
	[OutAttribute] IVsColorizer^% ppColorizer
)

Parameters

pBuffer
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextLines^

[in] The IVsTextLines interface for the requested colorizer.

ppColorizer
Type: Microsoft.VisualStudio.TextManager.Interop::IVsColorizer^

[out] Returns an IVsColorizer object.

Return Value

Type: System::Int32

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

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.

Return to top
Show: