IDebugBoundBreakpoint2::GetPendingBreakpoint
取得建立指定的繫結的中斷點之來源的暫止中斷點。
HRESULT GetPendingBreakpoint(
IDebugPendingBreakpoint2** ppPendingBreakpoint
);
int GetPendingBreakpoint(
out IDebugPendingBreakpoint2 ppPendingBreakpoint
);
參數
- ppPendingBreakpoint
[] out傳回IDebugPendingBreakpoint2物件,代表用來建立這樣的暫止中斷點繫結中斷點。
傳回值
如果成功的話,會傳回S_OK。 否則,會傳回錯誤碼。
備註
暫止中斷點可以視為一系列繫結中斷點,可套用至一或多個程式的程式碼所需的所有必要資訊。
範例
下列範例會示範如何實作這個方法,如CBoundBreakpoint物件,公開 (expose) 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;
}