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

# WdRegisterRemoteXboxGame

> WdRegisterRemoteXboxGame

Resolves and validates a remote folder path without performing platform game registration.

## Syntax

```cpp theme={null}
HRESULT WdRegisterRemoteXboxGame(  
         _In_z_ const char* remoteDevice,  
         _In_z_ const char* remoteFolderPath,  
         _In_opt_z_ const char* commonRootAlias  
);  
```

### Parameters

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

The hostname or IP address of the remote device (e.g., `"192.168.1.100"` or `"MyDevKit"`).

`_In_z_ remoteFolderPath`\
Type: **const char\***

The path on the remote device to the folder to validate (e.g., `"D:\\Games\\MyGame"` or `"MyGame"` when using a common root). If `remoteFolderPath` is an absolute path, `commonRootAlias` will be ignored.

`_In_opt_z_ commonRootAlias`\
Type: **const char\***

Optional. An alias for a common root directory on the remote device. Pass `nullptr` to use the default common root location.

### Return value

Type: **HRESULT**

Returns `S_OK` if successful; otherwise, returns an error code.

#### Error codes

| Code | Value | Description | Root Cause | Troubleshooting |
| - | - | - | - | - |
| E\_OUTSIDEGAMEROOT | 0x8C114001 | Path is outside GameRoot; access denied. | `remoteFolderPath` is a relative path that resolves outside the permitted common root, or `commonRootAlias` doesn't match a common root configured on the remote device. | Use a path that resolves inside the common root; Pass a `commonRootAlias` that exists on the remote device and contains the path |
| E\_CONNECTIONERROR | 0x8C114014 | Connection error. | Generic failure when establishing the network connection (transport‑level failure), unrelated to ip address validity or remote machine name resolution | Check network connectivity, firewall rules, service availability on the remote machine; Check visibility between devices, they should be able to ping each other; Retry the connection with logging enabled. |
| E\_NAMERESOLUTIONFAILED | 0x8C114012 | Could not resolve the remote machine name. | Hostname cannot be resolved via DNS or local name resolution. | Verify hostname spelling, DNS configuration, and network connectivity.; Use IP address to isolate name resolution issues. |
| E\_INVALIDADDRESS | 0x8C114013 | Invalid address. | Incorrect, malformed or unsupported network address supplied (e.g., bad IP format, wrong IP or unsupported protocol). | Confirm the right IP address; Correct the address format and ensure it uses a IPv4 protocol |
| E\_CLIENTNOTAUTHORIZED | 0x8C114008 | Device rejected client. | The client is not on the list of trusted clients of the device. Connection attempt was started before completing the pairing process | Complete pin pairing process successfully; Execute the connection request again |
| E\_SERVERNOTAUTHORIZED | 0x8C114009 | Client rejected device. | The target device is not on the list of trusted endpoints of the client. Connection attempt was started before completing the pairing process | Complete pin pairing process successfully; Execute the connection request again |
| E\_ADMIN\_REQUIRED | 0x8C114016 | Administrator privileges required. | Endpoint is not running with elevated privileges and the operation requires Administrator level permissions | Re-run the endpoint as Administrator |

## Remarks

`WdRegisterRemoteXboxGame` resolves the remote path; it does not inspect the contents of a game package.

Validation applies only when `remoteFolderPath` is a relative path. In that case the resolved path must fall within the permitted common root, and `E_OUTSIDEGAMEROOT` is returned if it does not, or if `commonRootAlias` doesn't match a common root configured on the remote device. An absolute `remoteFolderPath` is normalized and accepted without an existence or containment check, so a return value of `S_OK` does not indicate that the folder exists on the remote device.

> [!NOTE]
>
> Registration is not currently required to launch a game with [WdLaunchRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdlaunchremotegame.md).

## Requirements

| Requirement | Value |
| - | - |
| **Header** | WdRemoteIteration.h |
| **Library** | wdremoteapi.lib |
| **Supported OS** | Windows 11 and later |
| **Supported architectures** | x64, ARM64 |

## See also

* [WdLaunchRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdlaunchremotegame.md)
* [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md)
* [XBOX PC Remote Iteration API Error Codes](https://docs.xbox.com/reference/remoting/error-codes.md)
* [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)
- [WdLaunchRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdlaunchremotegame.md)
- [WdResumeRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdresumeremotegame.md)
- [WdTerminateRemoteGame](https://docs.xbox.com/reference/remoting/functions/wdterminateremotegame.md)
- [XBOX PC Remote (wdRemote.exe)](https://docs.xbox.com/tools/tools-pc/commandlinetools/gr-wdRemote.md)
