IVsLanguageDebugInfo2.QueryCommonLanguageBlock 方法

定义

确定指定的位置是否包含在特定类型的异常处理程序块中。

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

参数

pBuffer
IVsTextBuffer

IVsTextBuffer 包含要检查的文本的。

iLine
Int32

中要检查的行。

iCol
Int32

中要检查的列。

dwFlag
UInt32

中一个来自枚举的值,该值 COMMONLANGUAGEBLOCK 指定要查找的通用块。

pfInBlock
Int32

弄如果 iLine 和在 iCol 指定的公共语言块中,则返回非零; 否则返回零。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr:

HRESULT IVsLanguageDebugInfo2::QueryCommonLanguageBlock(  
   [in] IVsTextBuffer *pBuffer,  
   [in] long iLine,  
   [in] long iCol,  
   [in] DWORD dwFlag,  
   [out] BOOL *pfInBlock  
);  

异常处理程序的常见块基于语言服务实现的语言,但通常包括 try 块和 catch 块。 某些语言支持附加的块,无论是否发生异常,都会执行此块;例如,c # 具有 finally 块。

适用于