共用方式為


IDebugBoundBreakpoint2::GetState

 

如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件

取得這個繫結中斷點的狀態。

語法

HRESULT GetState(   
   BP_STATE* pState  
);  
int GetState(   
   out enum_BP_STATE pState  
);  

參數

pState
[out]傳回值,從BP_STATE列舉,描述中斷點的狀態。

傳回值

如果成功,傳回S_OK; 否則傳回錯誤碼。

範例

下列範例示範如何實作這種簡單的方式CBoundBreakpoint公開物件IDebugBoundBreakpoint2介面。

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

另請參閱

IDebugBoundBreakpoint2
BP_STATE