IVsHiddenTextManager.GetHiddenTextSession Method
Returns the current hidden text session for the specified text buffer, if one exists.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣言
Function GetHiddenTextSession ( _
pOwningObject As Object, _
<OutAttribute> ByRef ppSession As IVsHiddenTextSession _
) As Integer
'使用
Dim instance As IVsHiddenTextManager
Dim pOwningObject As Object
Dim ppSession As IVsHiddenTextSession
Dim returnValue As Integer
returnValue = instance.GetHiddenTextSession(pOwningObject, _
ppSession)
int GetHiddenTextSession(
Object pOwningObject,
out IVsHiddenTextSession ppSession
)
int GetHiddenTextSession(
[InAttribute] Object^ pOwningObject,
[OutAttribute] IVsHiddenTextSession^% ppSession
)
abstract GetHiddenTextSession :
pOwningObject:Object *
ppSession:IVsHiddenTextSession byref -> int
function GetHiddenTextSession(
pOwningObject : Object,
ppSession : IVsHiddenTextSession
) : int
Parameters
- pOwningObject
Type: System.Object
[in] Text buffer containing the outlining or hidden text session.
- ppSession
Type: Microsoft.VisualStudio.TextManager.Interop.IVsHiddenTextSession%
[out] Pointer to the outlining or hidden text session object (IVsHiddenTextSession) for the referenced text buffer.
Return Value
Type: System.Int32
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 nulla null reference (Nothing in Visual Basic), 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.