description | title | ms.date | ms.topic | f1_keywords | helpviewer_keywords | author | ms.author | manager | ms.subservice | dev_langs | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Toggles the virtualized state of this pending breakpoint. |
IDebugPendingBreakpoint2::Virtualize |
11/04/2016 |
reference |
|
|
maiak |
maiak |
mijacobs |
debug-diagnostics |
|
Toggles the virtualized state of this pending breakpoint. When a pending breakpoint is virtualized, the debug engine will attempt to bind it every time new code loads into the program.
HRESULT Virtualize(
BOOL fVirtualize
);
int Virtualize(
int fVirtualize
);
fVirtualize
[in] Set to nonzero (TRUE
) to virtualize the pending breakpoint, or to zero (FALSE
) to turn off virtualization.
If successful, returns S_OK
; otherwise, returns an error code. Returns E_BP_DELETED
if the breakpoint has been deleted.
A virtualized breakpoint is bound every time code is loaded.
The following example shows how to implement this method for a simple CPendingBreakpoint
object that exposes the IDebugPendingBreakpoint2 interface.
HRESULT CPendingBreakpoint::Virtualize(BOOL fVirtualize)
{
HRESULT hr;
// Verify that the pending breakpoint has not been deleted. If deleted,
// then return hr = E_BP_DELETED.
if (m_state.state != PBPS_DELETED)
{
if (fVirtualize)
{
// Set the PBPSF_VIRTUALIZED flag in the PENDING_BP_STATE_FLAGS
// structure.
SetFlag(m_state.flags, PBPSF_VIRTUALIZED);
}
else
{
// Clear the PBPSF_VIRTUALIZED flag in the PENDING_BP_STATE_FLAGS
// structure.
ClearFlag(m_state.flags, PBPSF_VIRTUALIZED);
}
hr = S_OK;
}
else
{
hr = E_BP_DELETED;
}
return hr;
}