次の方法で共有


IVsLanguageDebugInfo2.QueryCommonLanguageBlock Method

Definition

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

public:
 int QueryCommonLanguageBlock(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, int iLine, int iCol, System::UInt32 dwFlag, [Runtime::InteropServices::Out] int % pfInBlock);
int QueryCommonLanguageBlock(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, int iLine, int iCol, unsigned int dwFlag, [Runtime::InteropServices::Out] int & pfInBlock);
public int QueryCommonLanguageBlock (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, int iLine, int iCol, uint dwFlag, out int pfInBlock);
abstract member QueryCommonLanguageBlock : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * int * int * uint32 * int -> int
Public Function QueryCommonLanguageBlock (pBuffer As IVsTextBuffer, iLine As Integer, iCol As Integer, dwFlag As UInteger, ByRef pfInBlock As Integer) As Integer

Parameters

pBuffer
IVsTextBuffer

[in] An IVsTextBuffer containing the text to examine.

iLine
Int32

[in] Line to examine.

iCol
Int32

[in] Column to examine.

dwFlag
UInt32

[in] A value from the COMMONLANGUAGEBLOCK enumeration specifying which common block to look for.

pfInBlock
Int32

[out] Returns non-zero if iLine and iCol is inside the specified common language block; otherwise, returns zero.

Returns

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.

Applies to