指定したバインド ブレークポイントの作成元である、保留中のブレークポイントを取得します。
構文
パラメーター
ppPendingBreakpoint
[出力] このバインド ブレークポイントの作成に使用された保留中のブレークポイントを表す IDebugPendingBreakpoint2 オブジェクトを返します。
戻り値
成功した場合は、S_OK
を返します。それ以外の場合は、エラー コードを返します。
解説
保留中のブレークポイントは、1 つまたは複数のプログラムに適用できるコードにブレークポイントをバインドするために必要なすべての情報のコレクションと考えることができます。
例
次の例は、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;
}