Not
Bu sayfaya erişim yetkilendirme gerektiriyor. Oturum açmayı veya dizinleri değiştirmeyi deneyebilirsiniz.
Bu sayfaya erişim yetkilendirme gerektiriyor. Dizinleri değiştirmeyi deneyebilirsiniz.
Bu bekleyen kesme noktasından kaynaklanan tüm hata kesme noktalarının listesini alır.
Sözdizimi
int EnumErrorBreakpoints(
enum_BP_ERROR_TYPE bpErrorType,
out IEnumDebugErrorBreakpoints2 ppEnum
);
Parametreler
bpErrorType
[in] BP_ERROR_TYPE numaralandırmasından numaralandıracak hata türünü seçen değerlerin birleşimi.
ppEnum
[out] IDebugErrorBreakpoint2 nesnelerinin listesini içeren bir IEnumDebugErrorBreakpoints2 nesnesi döndürür.
İade Değeri
Başarılı olursa döndürür S_OK; aksi takdirde bir hata kodu döndürür. Kesme noktası silinmişse döndürür E_BP_DELETED .
Örnek
Aşağıdaki örnek, IDebugPendingBreakpoint2 arabirimini kullanıma sunan basit CPendingBreakpoint bir nesne için bu yöntemin nasıl uygulandığını gösterir.
HRESULT CPendingBreakpoint::EnumErrorBreakpoints(
BP_ERROR_TYPE bpErrorType,
IEnumDebugErrorBreakpoints2** ppEnum)
{
HRESULT hr;
// Verify that the passed IEnumDebugErrorBreakpoints2 interface pointer
// is valid.
if (ppEnum)
{
// Verify that the pending breakpoint has not been deleted. If
// deleted, then return hr = E_BP_DELETED.
if (m_state.state != PBPS_DELETED)
{
// Verify that this error is not a warning.
// All errors supported by this DE are errors, not warnings.
if (IsFlagSet(bpErrorType, BPET_TYPE_ERROR) && m_pErrorBP)
{
// Get the error breakpoint.
CComPtr<IDebugErrorBreakpoint2> spErrorBP;
hr = m_pErrorBP->QueryInterface(&spErrorBP);
assert(hr == S_OK);
if (hr == S_OK)
{
// Create the error breakpoint enumerator.
CComObject<CEnumDebugErrorBreakpoints>* pErrorEnum;
hr = CComObject<CEnumDebugErrorBreakpoints>::CreateInstance(&pErrorEnum);
assert(hr == S_OK);
if (hr == S_OK)
{
// Initialize the enumerator of error breakpoints with
// the IDebugErrorBreakpoint2 information.
IDebugErrorBreakpoint2* rgpErrorBP[] = { spErrorBP.p };
hr = pErrorEnum->Init(rgpErrorBP, &(rgpErrorBP[1]), NULL, AtlFlagCopy);
if (hr == S_OK)
{
// Verify that the passed IEnumDebugErrorBreakpoints2
// interface can be queried by the created
// CEnumDebugErrorBreakpoints object.
hr = pErrorEnum->QueryInterface(ppEnum);
assert(hr == S_OK);
}
// Otherwise, delete the CEnumDebugErrorBreakpoints
// object.
if (FAILED(hr))
{
delete pErrorEnum;
}
}
}
}
else
{
hr = S_FALSE;
}
}
else
{
hr = E_BP_DELETED;
}
}
else
{
hr = E_INVALIDARG;
}
return hr;
}