> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblPresenceStopTrackingUsers

> Removes users from the list of users for whom XSAPI tracks real-time device and title Presence changes.

Configures the list of users for whom real-time device and title presence updates will be tracked. Presence updates for the specified Users will no longer be received.

## Syntax

```cpp theme={null}
HRESULT XblPresenceStopTrackingUsers(  
         XblContextHandle xblContextHandle,  
         const uint64_t* xuids,  
         size_t xuidsCount  
)  
```

### Parameters

*xblContextHandle*   \_In\_\
Type: [XblContextHandle](https://docs.xbox.com/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

XBOX services context for the local user.

*xuids*   \_In\_\
Type: uint64\_t\*

Array of XboxUserIDs to remove from the list of tracked Users.

*xuidsCount*   \_In\_\
Type: size\_t

Length of xuids array.

### Return value

Type: HRESULT

Returns `S_OK` on success, or an error code on failure. Possible error codes include the following. This list isn't exhaustive.

| Return code | Description |
| - | - |
| E\_INVALIDARG | *xblContextHandle* or *xuids* is null. |

## Remarks

Tracking is reference counted. A user stays tracked until this function has been called once for each successful [XblPresenceTrackUsers](https://docs.xbox.com/reference/live/xsapi-c/presence_c/functions/xblpresencetrackusers.md) call for that user. When a user is no longer tracked, XSAPI removes the Real-Time Activity (RTA) subscriptions for that user, and neither device nor title Presence updates are received for the user.

This function replaces the deprecated `XblPresenceUnsubscribeFromDevicePresenceChange` function.

## Requirements

**Header:** presence\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[presence\_c](https://docs.xbox.com/reference/live/xsapi-c/presence_c/presence_c_members.md)\
[XblPresenceTrackUsers](https://docs.xbox.com/reference/live/xsapi-c/presence_c/functions/xblpresencetrackusers.md)


## Related topics

- [XblPresenceStopTrackingAdditionalTitles](https://docs.xbox.com/reference/live/xsapi-c/presence_c/functions/xblpresencestoptrackingadditionaltitles.md)
- [XblPresenceTrackUsers](https://docs.xbox.com/reference/live/xsapi-c/presence_c/functions/xblpresencetrackusers.md)
- [Handling a device Presence change](https://docs.xbox.com/services/xbox-services/community/presence/how-to/live-handling-a-device-presence-change.md)
- [presence_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/presence_c/presence_c_members.md)
- [XblUserStatisticsStopTrackingUsers](https://docs.xbox.com/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsstoptrackingusers.md)
