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

# WdGetDeviceProperty

> WdGetDeviceProperty

Returns a serialized metadata property without creating it.

**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 WdGetDeviceProperty(
    _In_z_ const char* remoteDevice,
    _In_z_ const char* metadataNamespace,
    _In_z_ const char* propertyName,
    _Out_ bool* propertyFound,
    _In_ WdStringResultCallback callback,
    _In_opt_ void* context
);
```

### Parameters

`remoteDevice`\
Type: **const char\***

The saved device name or IP address, encoded as UTF-8. This operation acts on the current user's local catalog.

`metadataNamespace`\
Type: **const char\***

The UTF-8 application-owned namespace name. An empty string selects the built-in namespace where supported.

`propertyName`\
Type: **const char\***

The UTF-8 property name.

`propertyFound`\
Type: **bool\***

Required output indicating whether the property exists.

`callback`\
Type: **WdStringResultCallback**

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

A missing device returns `WD_E_DEVICE_NOTFOUND`. A missing namespace or property returns `S_OK`, sets `propertyFound` to `false`, and doesn't invoke the callback. A present property sets it to `true` and invokes the required callback once. Copy the JSON string during the callback.

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)
- [WdDeviceProperty](https://docs.xbox.com/reference/remoting/structs/wddeviceproperty.md)
- [WdDevicePropertyCallback](https://docs.xbox.com/reference/remoting/callbacks/wddevicepropertycallback.md)
- [WdEnumDeviceProperties](https://docs.xbox.com/reference/remoting/functions/wdenumdeviceproperties.md)
- [WdRemoveDeviceProperty](https://docs.xbox.com/reference/remoting/functions/wdremovedeviceproperty.md)
