IVsLanguageDebugInfo2.QueryCommonLanguageBlock Method (IVsTextBuffer, Int32, Int32, UInt32, Int32)
Determines whether the specified location is contained within a specified type of exception handler block.
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
int QueryCommonLanguageBlock( IVsTextBuffer pBuffer, int iLine, int iCol, uint dwFlag, out int pfInBlock )
Parameters
- pBuffer
-
Type:
Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer
[in] An IVsTextBuffer containing the text to examine.
- iLine
-
Type:
System.Int32
[in] Line to examine.
- iCol
-
Type:
System.Int32
[in] Column to examine.
- dwFlag
-
Type:
System.UInt32
[in] A value from the COMMONLANGUAGEBLOCK enumeration specifying which common block to look for.
- 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.Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.