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

# GetDeviceRemovedReason

> Gets the reason that the device was removed.

Gets the reason that the device was removed, or **S\_OK** if the device isn't removed. To be called back when a device is removed, consider using [ID3D12Fence::SetEventOnCompletion](/reference/graphics/d3d12/interfaces/id3d12fence/methods/id3d12fence_seteventoncompletion_public) with a value of **UINT64\_MAX**. That's because device removal causes all fences to be signaled to that value (which also implies completing all events waited on, because they'll all be less than **UINT64\_MAX**).

## Syntax

```cpp theme={null}
HRESULT GetDeviceRemovedReason(
)
```

### Parameters

### Return value

Type: HRESULT

This method returns the reason that the device was removed.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [D3D12_DEVICE_REMOVED_EXTENDED_DATA1](/reference/graphics/d3d12/structs/d3d12_device_removed_extended_data1_public.md)
- [PFLobbyMemberRemovedReason](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/enums/pflobbymemberremovedreason.md)
- [LobbyMemberRemovedReason](/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LobbyMemberRemovedReason.md)
- [PartyLocalUserRemovedReason](/services/playfab/multiplayer/networking/reference/enums/partylocaluserremovedreason.md)
- [PFLobbyMemberRemovedStateChange](/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/structs/pflobbymemberremovedstatechange.md)
