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

# XAsyncGetStatus

> XAsyncGetStatus

# XAsyncGetStatus

비동기 호출의 상태를 반환하며, 선택적으로 완료될 때까지 대기합니다.

## 구문

```cpp theme={null}
HRESULT XAsyncGetStatus(  
         XAsyncBlock* asyncBlock,  
         bool wait  
)  
```

### 매개 변수

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

비동기 호출에 전달된 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)에 대한 포인터입니다.

*wait*   \_In\_\
형식: bool

true이면 `XAsyncGetStatus`는 비동기 호출이 완료되거나 취소될 때까지 대기합니다.

### 반환 값

형식: [HRESULT](https://learn.microsoft.com/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a)

성공하면 `S_OK`를 반환하고, 그렇지 않으면 오류 코드를 반환합니다. 오류 코드 목록은 [오류 코드](/reference/errorcodes)를 참조하세요.

## 설명

비동기 호출이 완료되면 [XAsyncGetResult](/reference/system/xasyncprovider/functions/xasyncgetresult)를 호출하여 비동기 호출에 결과 데이터 페이로드가 있는 경우 결과를 가져올 수 있습니다. 비동기 호출에 결과 데이터 페이로드가 없는 경우 [XAsyncGetResult](/reference/system/xasyncprovider/functions/xasyncgetresult)를 호출할 필요가 없습니다.

**참고:** 완료 콜백과 wait 매개 변수가 true인 `XAsyncGetStatus`를 모두 사용하여 호출이 완료된 시점을 식별할 수 있습니다. 이러한 호출의 순서는 모호할 수 있으며 모범 사례로서 동일한 호출에 대해 둘 다 사용해서는 안 됩니다.

## 요구 사항

**헤더:** XAsync.h

**라이브러리:** xgameruntime.lib

**지원되는 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 설명서

* [간단한 작업 실행](/build/core-features/common/async/async-libraries/async-library-xasync-example-run-simple-task)
* [XAsync 라이브러리 개요](/build/core-features/common/async/async-libraries/async-library-xasync)
* [사용자 지정 공급자 설정](/build/core-features/common/async/async-libraries/async-library-xasyncprovider-example-setup-custom-provider)
* [비동기 프로그래밍 모델](/build/core-features/common/async/async-programming-model)
* [비동기 프로그래밍 설계 목표 및 개선 사항](/build/core-features/common/async/async-whitepaper)

## 함께 보기

[XAsync 멤버](/reference/system/xasync/xasync_members)\
[XAsyncGetResult](/reference/system/xasyncprovider/functions/xasyncgetresult)\
[비동기 프로그래밍 모델](/build/core-features/common/async/async-programming-model)
