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

# XAsyncCancel

> XAsyncCancel

# XAsyncCancel

非同期呼び出しのキャンセルを試みます。

## Syntax

```cpp theme={null}
void XAsyncCancel(  
         XAsyncBlock* asyncBlock  
)  
```

### Parameters

*asyncBlock*   \_Inout\_\
型: [XAsyncBlock\*](/reference/system/xasync/structs/xasyncblock)

非同期呼び出しの [XAsyncBlock](/reference/system/xasync/structs/xasyncblock) へのポインター。

### Return value

型: void

## Remarks

まだ完了していない非同期呼び出しに対して `XAsyncCancel` 関数が呼び出された場合、[XAsyncGetResult](/reference/system/xasyncprovider/functions/xasyncgetresult)、[XAsyncGetResultSize](/reference/system/xasync/functions/xasyncgetresultsize)、および [XAsyncGetStatus](/reference/system/xasync/functions/xasyncgetstatus) 関数は `E_ABORT` を返し、非同期呼び出しの完了がシグナルされます。キャンセルはキャンセルされる呼び出しに応じて、同期的、非同期的に発生するか、まったく発生しないことがあります。非同期呼び出しに完了コールバックが指定されている場合は、それが呼び出されます。完了コールバックの詳細については、[XAsyncCompletionRoutine](/reference/system/xasync/functions/xasynccompletionroutine) を参照してください。

既に完了した非同期呼び出しに対して `XAsyncCancel` 関数が呼び出された場合は、何も発生しません。

## Requirements

**ヘッダー:** XAsync.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## Conceptual documentation

* [XAsync library overview](/build/core-features/common/async/async-libraries/async-library-xasync)
* [Set up cancelability](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability)
* [Set up custom provider](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-custom-provider)
* [Asynchronous Programming Model](/build/core-features/common/async/async-programming-model)

## See also

[XAsyncCompletionRoutine](/reference/system/xasync/functions/xasynccompletionroutine)\
[XAsync Members](/reference/system/xasync/xasync_members)\
[Asynchronous Programming Model](/build/core-features/common/async/async-programming-model)


## Related topics

- [キャンセル可能性のセットアップ例](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability.md)
- [非同期プログラミング モデル](/ja-jp/build/core-features/common/async/async-programming-model.md)
- [XAsync](/ja-jp/reference/system/xasync/xasync_members.md)
- [XAsyncCompletionRoutine](/ja-jp/reference/system/xasync/functions/xasynccompletionroutine.md)
- [XAsync ライブラリの概要](/ja-jp/build/core-features/common/async/async-libraries/async-library-xasync.md)
