> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameProtocolUnregisterForActivation (deprecated)

> XGameProtocolUnregisterForActivation (deprecated)

# XGameProtocolUnregisterForActivation (deprecated)

<Info>This API is now deprecated. Use [XGameActivationUnregisterForEvent](/reference/system/xgameactivation/functions/xgameactivationunregisterforevent) instead.</Info>

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](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken)

The token that [XGameInviteRegisterForEvent](/reference/system/xgameinvite/functions/xgameinviteregisterforevent) 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</Note>
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](/reference/system/xgameprotocol/xgameprotocol_members)


## Related topics

- [XGameProtocolActivationCallbackXGameProtocol (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolactivationcallback.md)
- [XGameProtocolRegisterForActivation (deprecated)](/reference/system/xgameprotocol/functions/xgameprotocolregisterforactivation.md)
- [XGameProtocol (deprecated)](/reference/system/xgameprotocol/xgameprotocol_members.md)
- [XGameActivation](/reference/system/xgameactivation/xgameactivation_members.md)
- [XGameActivationRegisterForEvent](/reference/system/xgameactivation/functions/xgameactivationregisterforevent.md)
