IDebugPendingBreakpoint2::Virtualize

보류 중인 이 중단점의 가상화 상태를 전환합니다. 보류 중인 중단점이 가상화되면 디버그 엔진은 새 코드가 프로그램에 로드될 때마다 바인딩을 시도합니다.

구문

HRESULT Virtualize(
    BOOL fVirtualize
);
int Virtualize(
    int fVirtualize
);

매개 변수

fVirtualize
[in] 보류 중인 중단점을 가상화하려면 0이 아님(TRUE)으로 설정하고 가상화를 끄려면 0(FALSE)으로 설정합니다.

Return Value

성공하면 S_OK를 반환하고, 실패하면 오류 코드를 반환합니다. 중단점이 삭제된 경우 E_BP_DELETED를 반환합니다.

설명

가상화된 중단점은 코드가 로드될 때마다 바인딩됩니다.

예시

다음 예제에서는 CPendingBreakpointIDebugPendingBreakpoint2 인터페이스를 노출하는 간단한 개체에 대해 이 메서드를 구현하는 방법을 보여 줍니다.

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;
}

참고 항목