> ## 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.

# WdGetDefaultDevice

> WdGetDefaultDevice

Returns the saved default device, if one is selected.

**Introduced in:** [RIT 0.0.14-preview](https://docs.xbox.com/reference/remoting/release-versions.md#release-versions).

## Syntax

```cpp theme={null}
HRESULT WD_REMOTE_ITERATION_CALL WdGetDefaultDevice(
    _Out_ bool* deviceFound,
    _In_ WdDeviceInfoResultCallback callback,
    _In_opt_ void* context
);
```

### Parameters

`deviceFound`\
Type: **bool\***

Required output indicating whether a default device is selected.

`callback`\
Type: **WdDeviceInfoResultCallback**

The required result or enumeration callback. See Remarks for continuation and lifetime rules.

`context`\
Type: **void\***

Optional caller-owned context passed unchanged to the callback.

### Return value

Type: **HRESULT**

Returns `S_OK` on success; otherwise returns a failure HRESULT. Catalog operations also return catalog-specific errors described in [Error codes](https://docs.xbox.com/reference/remoting/error-codes.md).

## Remarks

Both `deviceFound` and the callback are required. With no default, the call succeeds, sets `deviceFound` to `false`, and doesn't invoke the callback. With a default, the callback receives its record. This local query doesn't probe connectivity or authorization.

Saved-device APIs and pairing-ID APIs change different local stores. They don't replace the explicit `remoteDevice` argument of a remote API call; callers that want default selection must resolve it themselves.

## Requirements

| Requirement | Value |
| - | - |
| **Header** | WdRemoteIteration.h |
| **Library** | wdremoteapi.lib |
| **NuGet Package** | [Microsoft.GDK.RemoteIterationClientApi](https://aka.ms/GameDevRemoteAPI) |

## See also

* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

- [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)
- [WdGetDevice](https://docs.xbox.com/reference/remoting/functions/wdgetdevice.md)
- [WdSetDefaultDevice](https://docs.xbox.com/reference/remoting/functions/wdsetdefaultdevice.md)
- [WdGetDeviceProperty](https://docs.xbox.com/reference/remoting/functions/wdgetdeviceproperty.md)
- [WdGetDeviceStoragePath](https://docs.xbox.com/reference/remoting/functions/wdgetdevicestoragepath.md)
