IVsContainedLanguageFactory.GetLanguage Method

Definition

Returns an IVsContainedLanguage object that a primary language can use to delegate certain responsibilities for managing a contained language.

C++/CX
public:
 int GetLanguage(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy, unsigned int itemid, Microsoft::VisualStudio::TextManager::Interop::IVsTextBufferCoordinator ^ pBufferCoordinator, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsContainedLanguage ^ &  ppLanguage);

Parameters

pHierarchy
IVsHierarchy

[in] An IVsHierarchy object representing the hierarchy to which this object belongs.

itemid
UInt32

[in] A unique identifier for a source file or one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.

pBufferCoordinator
IVsTextBufferCoordinator

[in] An IVsTextBufferCoordinator object representing the buffer coordinator to associate with the contained language.

ppLanguage
IVsContainedLanguage

[out] Returns an IVsContainedLanguage object representing the contained language for the specified hierarchy item.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Remarks

Com Signature

From singlefileeditor.idl:

cpp#
HRESULT GetLanguage(  
   [in]          IVsHierarchy*             pHierarchy,  
   [in]          VSITEMID                  itemid,  
   [in]          IVsTextBufferCoordinator* pBufferCoordinator,  
   [out, retval] IVsContainedLanguage**    ppLanguage  
);  

Applies to

Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022