IDebugBoundBreakpoint2::GetState

Gets the state of this bound breakpoint.

Syntax

int GetState( 
    out enum_BP_STATE pState
);

Parameters

pState
[out] Returns a value from the BP_STATE enumeration that describes the state of the breakpoint.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Example

The following example shows how to implement this method for a simple CBoundBreakpoint object that exposes the IDebugBoundBreakpoint2 interface.

HRESULT CBoundBreakpoint::GetState(BP_STATE* pState)
{
    HRESULT hr;

    // Check for a valid pointer to pState and assign the local state variable.
    if (pState)
    {
        *pState = m_state;
        hr = S_OK;
    }
    else
    {
        hr = E_INVALIDARG;
    }

    return hr;
}

See also