Freigeben über


IVsHiddenTextManager.GetHiddenTextSession Method

Definition

Returns the current hidden text session for the specified text buffer, if one exists.

public:
 int GetHiddenTextSession(System::Object ^ pOwningObject, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsHiddenTextSession ^ % ppSession);
public:
 int GetHiddenTextSession(Platform::Object ^ pOwningObject, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsHiddenTextSession ^ &  ppSession);
int GetHiddenTextSession(winrt::Windows::Foundation::IInspectable const & pOwningObject, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsHiddenTextSession const & & ppSession);
public int GetHiddenTextSession (object pOwningObject, out Microsoft.VisualStudio.TextManager.Interop.IVsHiddenTextSession ppSession);
abstract member GetHiddenTextSession : obj * IVsHiddenTextSession -> int
Public Function GetHiddenTextSession (pOwningObject As Object, ByRef ppSession As IVsHiddenTextSession) As Integer

Parameters

pOwningObject
Object

[in] Text buffer containing the outlining or hidden text session.

ppSession
IVsHiddenTextSession

[out] Pointer to the outlining or hidden text session object (IVsHiddenTextSession) for the referenced text buffer.

Returns

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

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsHiddenTextManager::GetHiddenTextSession(  
   [in] IUnknown *pOwningObject,   
   [out] IVsHiddenTextSession **ppSession  
);   

If this method returns null, then no other hidden text sessions exist for the specified buffer. In this case, call CreateHiddenTextSession to create a hidden text session for the buffer. Use the methods of IVsHiddenTextSession to add hidden text regions to the buffer.

Applies to