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

# XGameProtocolUnregisterForActivation (deprecated)

> XGameProtocolUnregisterForActivation (deprecated)

> [!NOTE]
>
> This API is now deprecated. Use [XGameActivationUnregisterForEvent](https://docs.xbox.com/reference/system/xgameactivation/functions/xgameactivationunregisterforevent.md) instead.

Unregisters a callback for protocol activation.

## Syntax

```cpp theme={null}
STDAPI_(bool) XGameProtocolUnregisterForActivation(
    _In_ XTaskQueueRegistrationToken token,
    _In_ bool wait
    ) noexcept;
```

### Parameters

*token*   \_In\_\
Type: [XTaskQueueRegistrationToken](https://docs.xbox.com/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)

The token that [XGameInviteRegisterForEvent](https://docs.xbox.com/reference/system/xgameinvite/functions/xgameinviteregisterforevent.md) returns.

*wait*   \_In\_\
Type: bool

Wait for pending event callbacks to complete.

### Return value

Type: bool

Returns false if *wait* is false and the unregister is pending. Returns true otherwise.

## Remarks

\[!NOTE] This function isn't safe to call on a time-sensitive thread. For more
information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

## Requirements

**Header:** XGameProtocol.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XGameProtocol members](https://docs.xbox.com/reference/system/xgameprotocol/xgameprotocol_members.md)


## Related topics

- [XGameProtocolActivationCallbackXGameProtocol (deprecated)](https://docs.xbox.com/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (deprecated)](https://docs.xbox.com/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocol (deprecated)](https://docs.xbox.com/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameActivation (API contents)](https://docs.xbox.com/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameActivationRegisterForEvent](https://docs.xbox.com/reference/system/xgameactivation/functions/xgameactivationregisterforevent.md)
