Skip to main content
This topic provides an example of how to run a Microsoft Game Development Kit (GDK) API task. Async Microsoft Game Development Kit (GDK) API functions internally implement the work callback. However, it still runs as directed by the task queue as specified in the async block. Running these methods requires the async block and whatever parameters are needed for the API.
This code doesn’t differ much from the code to run generic tasks. Instead of using XAsyncRun with a work callback, you call into the API that you want to use. The async block is set up in the same way. The difference there is that XUserAddAsync has data to be retrieved from the call that’s done in the completion callback with XUserAddResult.

Reference API documentation

See also

XAsync library overview Set up async task (example) Run simple task (example) XAsync
Last modified on August 4, 2026