IDebugBoundBreakpoint2::GetPendingBreakpoint
获取从中创建指定绑定断点的挂起断点。
语法
参数
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;
}