IDebugBoundBreakpoint2::GetBreakpointResolution
如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件。
取得描述此中斷點的中斷點解析度。
語法
HRESULT GetBreakpointResolution(
IDebugBreakpointResolution2** ppBPResolution
);
int GetBreakpointResolution(
out IDebugBreakpointResolution2 ppBPResolution
);
參數
ppBPResolution
[out]傳回IDebugBreakpointResolution2表示下列其中一種介面︰
中斷點解析物件,描述在程式碼位置已繫結程式碼中斷點的位置。
資料的位置已經在繫結資料中斷點。
傳回值
如果成功,傳回S_OK
; 否則傳回錯誤碼。 傳回E_BP_DELETED
如果繫結的中斷點物件的狀態設定為BPS_DELETED
(屬於BP_STATE列舉型別)。
備註
呼叫GetBreakpointType方法,以判斷是否中斷點解析程式碼或資料。
範例
下列範例示範如何實作這種簡單的方式CBoundBreakpoint
公開物件IDebugBoundBreakpoint2介面。
HRESULT CBoundBreakpoint::GetBreakpointResolution(
IDebugBreakpointResolution2** ppBPResolution)
{
HRESULT hr;
if (ppBPResolution)
{
// Verify that the bound breakpoint has not been deleted. If
// deleted, then return hr = E_BP_DELETED.
if (m_state != BPS_DELETED)
{
// Query for the IDebugBreakpointResolution2 interface.
hr = m_pBPRes->QueryInterface(IID_IDebugBreakpointResolution2,
(void **)ppBPResolution);
assert(hr == S_OK);
}
else
{
hr = E_BP_DELETED;
}
}
else
{
hr = E_INVALIDARG;
}
return hr;
}
另請參閱
IDebugBoundBreakpoint2
IDebugBreakpointResolution2
GetBreakpointType