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

# Procédure : soumission de rappels

> Procédure : soumission de rappels

## Exemple

L'exemple suivant montre comment soumettre un rappel au port de travail
ou au port d'achèvement d'une file d'attente de tâches. Il soumet d'abord un rappel de travail. Puis, à la fin du rappel de travail, il soumet un rappel d'achèvement. Il s'agit d'une utilisation typique. Par souci de concision, la fonction `SubmitCallbacks` est
utilisée dans les scénarios suivants.

```c++ theme={null}
void CALLBACK SampleCompletionCallback(void*, bool cancel)
{
    printf("Completion invoked on thread %d. Cancel? %d.\r\n",
    GetCurrentThreadId(), cancel);
}

void CALLBACK SampleWorkCallback(void* context, bool cancel)
{
    printf("Worker invoked on thread %d. Cancel? %d.\r\n",
    GetCurrentThreadId(), cancel);

    XTaskQueueHandle queueFromContext = static_cast<XTaskQueueHandle>(context);

    HRESULT hrCompletion = XTaskQueueSubmitCallback(
        queueFromContext,
        XTaskQueuePort::Completion,
        nullptr,
        SampleCompletionCallback);

    if (FAILED(hrCompletion))
    {
        printf("Error 0x%x submitting completion.\r\n", hrCompletion);
    }
}

void SubmitCallbacks(XTaskQueueHandle queue)
{
    HRESULT hrWork = XTaskQueueSubmitCallback(
        queue,
        XTaskQueuePort::Work,
        queue,
        SampleWorkCallback);

    if (FAILED(hrWork))
    {
        printf("Error 0x%x submitting work.\r\n", hrWork);
    }
}
```

## Voir aussi

[Conception de la file d'attente de tâches](/fr/build/core-features/common/async/async-task-queue-design)


## Related topics

- [Exigences XBOX testées lors de la certification pour les jeux sur console XBOX](/fr/publishing/certification/console-cert-tested-requirements.md)
- [Soumissions optionnelles de certification](/fr-CA/publishing/game-publishing/concepts/certification/certification-optional-submissions.md)
- [Soumissions de certification optionnelles](/fr/publishing/game-publishing/concepts/certification/certification-optional-submissions.md)
- [Notes de version de PlayFab Party](/fr-CA/services/playfab/multiplayer/networking/release-notes.md)
- [XR-003 Qualité du titre pour la soumission](/fr-CA/publishing/certification/xr/xr-003.md)
