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

# XAsyncCancel

> XAsyncCancel

# XAsyncCancel

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

## Syntax

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

### Parameters

*asyncBlock*   \_Inout\_\
型: [XAsyncBlock\*](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md)

非同期呼び出しの [XAsyncBlock](https://docs.xbox.com/ja-jp/reference/system/xasync/structs/xasyncblock.md) へのポインター。

### Return value

型: void

## Remarks

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

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

## Requirements

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

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

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

## Conceptual documentation

* [XAsync library overview](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-libraries/async-library-xasync.md)
* [Set up cancelability](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability.md)
* [Set up custom provider](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-custom-provider.md)
* [Asynchronous Programming Model](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)

## See also

[XAsyncCompletionRoutine](https://docs.xbox.com/ja-jp/reference/system/xasync/functions/xasynccompletionroutine.md)\
[XAsync Members](https://docs.xbox.com/ja-jp/reference/system/xasync/xasync_members.md)\
[Asynchronous Programming Model](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)


## Related topics

- [キャンセル可能性のセットアップ例](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-cancelability.md)
- [非同期プログラミング モデル](https://docs.xbox.com/ja-jp/build/core-features/common/async/async-programming-model.md)
- [PFMultiplayerServerPingQosServersAsync](https://docs.xbox.com/ja-jp/services/playfab/api-references/c/pfmultiplayerserverqos/functions/pfmultiplayerserverpingqosserversasync.md)
- [XAsync (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xasync/xasync_members.md)
- [Game Saves のオフライン モード](https://docs.xbox.com/ja-jp/services/playfab/player-progression/game-saves/offline.md)
