IDebugBreakpointRequest2::GetLocationType
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 breakpoint location type of this breakpoint request.
Syntax
HRESULT GetLocationType(
BP_LOCATION_TYPE* pBPLocationType
);
int GetLocationType(
out enum_BP_LOCATION_TYPE pBPLocationType
);
Parameters
pBPLocationType
[out] Returns a value from the BP_LOCATION_TYPE enumeration that describes the location of this breakpoint request.
Return Value
If successful, returns S_OK
; otherwise, returns an error code. Returns E_FAIL
if the bpLocation
field in the associated BP_REQUEST_INFO structure is not valid.
Example
The following example shows how to implement this method for a simple CDebugBreakpointRequest
object that exposes theIDebugBreakpointRequest2 interface.
HRESULT CDebugBreakpointRequest::GetLocationType(BP_LOCATION_TYPE* pBPLocationType)
{
HRESULT hr;
if (pBPLocationType)
{
// Set default BP_LOCATION_TYPE.
*pBPLocationType = BPLT_NONE;
// Check if the BPREQI_BPLOCATION flag is set in BPREQI_FIELDS.
if (IsFlagSet(m_bpRequestInfo.dwFields, BPREQI_BPLOCATION))
{
// Get the new BP_LOCATION_TYPE.
*pBPLocationType = m_bpRequestInfo.bpLocation.bpLocationType;
hr = S_OK;
}
else
{
hr = E_FAIL;
}
}
else
{
hr = E_INVALIDARG;
}
return hr;
}
See Also
IDebugBreakpointRequest2
BP_LOCATION_TYPE
BPREQI_FIELDS
BP_REQUEST_INFO