IVsLanguageDebugInfo2.QueryCommonLanguageBlock Method

Determines whether the specified location is contained within a specified type of exception handler block.

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

Syntax

声明
Function QueryCommonLanguageBlock ( _
    pBuffer As IVsTextBuffer, _
    iLine As Integer, _
    iCol As Integer, _
    dwFlag As UInteger, _
    <OutAttribute> ByRef pfInBlock As Integer _
) As Integer
int QueryCommonLanguageBlock(
    IVsTextBuffer pBuffer,
    int iLine,
    int iCol,
    uint dwFlag,
    out int pfInBlock
)
int QueryCommonLanguageBlock(
    [InAttribute] IVsTextBuffer^ pBuffer, 
    [InAttribute] int iLine, 
    [InAttribute] int iCol, 
    [InAttribute] unsigned int dwFlag, 
    [OutAttribute] int% pfInBlock
)
abstract QueryCommonLanguageBlock : 
        pBuffer:IVsTextBuffer * 
        iLine:int * 
        iCol:int * 
        dwFlag:uint32 * 
        pfInBlock:int byref -> int 
function QueryCommonLanguageBlock(
    pBuffer : IVsTextBuffer, 
    iLine : int, 
    iCol : int, 
    dwFlag : uint, 
    pfInBlock : int
) : int

Parameters

  • pfInBlock
    Type: System.Int32%
    [out] Returns non-zero if iLine and iCol is inside the specified common language block; otherwise, returns zero.

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 IVsLanguageDebugInfo2::QueryCommonLanguageBlock(
   [in] IVsTextBuffer *pBuffer,
   [in] long iLine,
   [in] long iCol,
   [in] DWORD dwFlag,
   [out] BOOL *pfInBlock
);

An exception handler common block is based on the language implemented by the language service but typically includes a try block and a catch block. Some languages support an additional block that is executed regardless of whether an exception occurred; for example, C# has the finally block.

.NET Framework Security

See Also

Reference

IVsLanguageDebugInfo2 Interface

Microsoft.VisualStudio.TextManager.Interop Namespace