IDebugBoundBreakpoint2:: GetPendingBreakpoint

获取指定的绑定断点创建的挂起的断点。

HRESULT GetPendingBreakpoint( 
   IDebugPendingBreakpoint2** ppPendingBreakpoint
);
int GetPendingBreakpoint( 
   out IDebugPendingBreakpoint2 ppPendingBreakpoint
);

参数

  • ppPendingBreakpoint
    [out] 返回表示挂起的断点用于创建此绑定断点的 IDebugPendingBreakpoint2 对象。

返回值

如果成功,则返回; S_OK否则,返回错误代码。

备注

挂起断点可视为必要所需的所有信息的集合绑定可应用于一个或多个程序的断点代码。

示例

下面的示例演示如何执行显示 IDebugBoundBreakpoint2 接口的简单 CBoundBreakpoint 对象的方法。

HRESULT CBoundBreakpoint::GetPendingBreakpoint(
    IDebugPendingBreakpoint2** ppPendingBreakpoint)
{  
   HRESULT hr;  
  
   // Check for valid IDebugPendingBreakpoint2 interface pointer.  
   if (ppPendingBreakpoint)  
   {  
      // Be sure that the bound breakpoint has not been deleted. If
      // deleted, then return hr = E_BP_DELETED.  
      if (m_state != BPS_DELETED)  
      {  
         // Query for the IDebugPendingBreakpoint2 interface.  
         hr = m_pPendingBP->QueryInterface(IID_IDebugPendingBreakpoint2,
                                           (void**)ppPendingBreakpoint);  
      }  
      else  
      {  
         hr = E_BP_DELETED;  
      }  
   }  
   else  
   {  
      hr = E_INVALIDARG;  
   }  
  
   return hr;  
}  

请参见

参考

IDebugBoundBreakpoint2

IDebugPendingBreakpoint2