IDebugBreakpointUnboundEvent2::GetBreakpoint
取得成為未繫結中斷點。
HRESULT GetBreakpoint(
IDebugBoundBreakpoint2** ppBP
);
int GetBreakpoint(
out IDebugBoundBreakpoint2 ppBP
);
參數
- ppBP
[] out傳回IDebugBoundBreakpoint2表示中斷點未繫結的物件。
傳回值
如果成功的話,會傳回S_OK。 否則,會傳回錯誤碼。
範例
下列範例會示範如何實作這個方法,如 CBreakpointUnboundDebugEventBase 物件,公開 (expose) IDebugBreakpointUnboundEvent2介面。
STDMETHODIMP CBreakpointUnboundDebugEventBase::GetBreakpoint(
IDebugBoundBreakpoint2 **ppbp)
{
HRESULT hRes = E_FAIL;
if ( ppbp )
{
if ( m_pbp )
{
IDebugBoundBreakpoint2 *pibp;
hRes = m_pbp->QueryInterface(IID_IDebugBoundBreakpoint2, (void **) & pibp);
if ( S_OK == hRes )
*ppbp = pibp;
}
else
hRes = E_FAIL;
}
else
hRes = E_INVALIDARG;
return ( hRes );
}