다음을 통해 공유


IDebugBoundBreakpoint2::GetState

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the state of this bound breakpoint.

Syntax

HRESULT GetState(   
   BP_STATE* pState  
);  
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

IDebugBoundBreakpoint2
BP_STATE