IDebugBoundBreakpoint2::GetPendingBreakpoint
如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件。
取得建立指定的繫結的中斷點的暫止中斷點。
語法
HRESULT GetPendingBreakpoint(
IDebugPendingBreakpoint2** ppPendingBreakpoint
);
int GetPendingBreakpoint(
out IDebugPendingBreakpoint2 ppPendingBreakpoint
);
參數
ppPendingBreakpoint
[out]傳回IDebugPendingBreakpoint2物件,表示用於建立這個暫止中斷點繫結的中斷點。
傳回值
如果成功,傳回S_OK
; 否則傳回錯誤碼。
備註
暫止中斷點可以視為中斷點繫結至可套用至一或多個程式的程式碼所需的所有必要資訊的集合。
範例
下列範例示範如何實作這種簡單的方式CBoundBreakpoint
公開物件IDebugBoundBreakpoint2介面。
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;
}