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

# XAsyncGetStatus

> XAsyncGetStatus

# XAsyncGetStatus

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

## 구문

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

### 매개 변수

*asyncBlock*   \_Inout\_\
형식: [XAsyncBlock\*](https://docs.xbox.com/ko/reference/system/xasync/structs/xasyncblock.md)

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

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

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

### 반환 값

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

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

## 설명

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

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

## 요구 사항

**헤더:** XAsync.h

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

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

## 개념 설명서

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

## 함께 보기

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


## Related topics

- [XAsyncGetResultSize](https://docs.xbox.com/ko/reference/system/xasync/functions/xasyncgetresultsize.md)
- [PFUninitializeAsync](https://docs.xbox.com/ko/services/playfab/api-references/c/pfcore/functions/pfuninitializeasync.md)
- [XAsyncCompletionRoutine](https://docs.xbox.com/ko/reference/system/xasync/functions/xasynccompletionroutine.md)
- [XblAchievementsUpdateAchievementAsync](https://docs.xbox.com/ko/reference/live/xsapi-c/achievements_c/functions/xblachievementsupdateachievementasync.md)
- [XblSocialSubmitReputationFeedbackAsync](https://docs.xbox.com/ko/reference/live/xsapi-c/social_c/functions/xblsocialsubmitreputationfeedbackasync.md)
