---
UID: NF:directml.IDMLDevice.GetDeviceRemovedReason
title: IDMLDevice::GetDeviceRemovedReason
description: Retrieves the reason that the DirectML device was removed.
old-location: direct3d12\idmldevice_getdeviceremovedreason.htm
tech.root: direct3d12
ms.assetid: 59C889EB-35FB-408E-91AB-8CDC7E53E6F2
ms.date: 12/5/2018
ms.keywords: GetDeviceRemovedReason, GetDeviceRemovedReason method, GetDeviceRemovedReason method,IDMLDevice interface, IDMLDevice interface,GetDeviceRemovedReason method, IDMLDevice.GetDeviceRemovedReason, IDMLDevice::GetDeviceRemovedReason, direct3d12.idmldevice_getdeviceremovedreason, directml/IDMLDevice::GetDeviceRemovedReason
f1_keywords:
- directml/IDMLDevice.GetDeviceRemovedReason
dev_langs:
- c++
req.header: directml.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: 
req.target-min-winversvr: 
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: 
req.max-support: 
req.namespace: 
req.assembly: 
req.type-library: 
req.lib: DirectML.lib
req.dll: DirectML.dll
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- DirectML.dll
api_name:
- IDMLDevice.GetDeviceRemovedReason
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IDMLDevice::GetDeviceRemovedReason


## -description






Retrieves the reason that the DirectML device was removed.


## -parameters






## -returns



Type: [**HRESULT**](/windows/desktop/winprog/windows-data-types)

An [HRESULT](/windows/desktop/winprog/windows-data-types) containing the reason that the device was removed, or **S_OK** if the device has not been removed.




## -see-also




[IDMLDevice](/windows/desktop/api/directml/nn-directml-idmldevice)
 

 

