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

# XUserResolveIssueWithUiAsync

> XUserResolveIssueWithUiAsync

# XUserResolveIssueWithUiAsync

비유니코드 URL로 토큰 문제를 해결하기 위한 시스템 사용자 인터페이스를 표시합니다.

## 구문

```cpp theme={null}
HRESULT XUserResolveIssueWithUiAsync(  
         XUserHandle user,  
         const char* url,  
         XAsyncBlock* async  
)  
```

### 매개변수

*user*   \_In\_\
형식: XUserHandle

토큰 문제가 있는 사용자에 대한 핸들입니다.

*url*   \_In\_opt\_z\_\
형식: char\*

동의와 같은 XBOX Live 문제의 경우 **nullptr**을 전달합니다. 그렇지 않으면 문제를 발생시킨 웹 요청의 URL로 설정합니다.

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

호출의 상태를 폴링하고 호출 결과를 가져오기 위한 [XAsyncBlock](/reference/system/xasync/structs/xasyncblock)입니다.

### 반환값

형식: HRESULT

성공하면 S\_OK를 반환하고, 그렇지 않으면 오류 코드를 반환합니다. 오류 코드 목록은 [Error Codes](/reference/errorcodes)를 참조하십시오.

## 설명

XUserResolveIssueWithUiAsync가 반환하는 결과를 반환하려면 [XUserResolveIssueWithUiResult](/reference/system/xuser/functions/xuserresolveissuewithuiresult)를 호출합니다.
XUsers API가 E\_GAMEUSER\_RESOLVE\_USER\_ISSUE\_REQUIRED 오류를 반환하는 경우, 사용자는 문제를 해결하기 위해 시스템 사용자 인터페이스(UI)와 상호 작용해야 합니다.
적절한 시스템 UI를 표시하려면 **XUserResolveIssueWithUiAsync**를 호출합니다.

유니코드 URL로 토큰 문제를 해결하기 위한 시스템 사용자 인터페이스를 표시하려면 [XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async)를 호출합니다.

다음 예제에서는 URL로 토큰 문제를 해결하기 위한 시스템 UI를 표시하는 방법을 보여줍니다.

```cpp theme={null}
HRESULT ResolveUserIssueComplete(XAsyncBlock* ab)
{
    if (SUCCEEDED_LOG(XUserResolveIssueWithUiResult(ab)))
    {
        appLog.AddLog("Successfully Resolved User Issue\n");
    }

    return S_OK;
}

HRESULT ResolveUserIssueUtf16Complete(XAsyncBlock* ab)
{
    if (SUCCEEDED_LOG(XUserResolveIssueWithUiUtf16Result(ab)))
    {
        appLog.AddLog("Successfully Resolved User Issue\n");
    }

    return S_OK;
}

HRESULT ResolveUserIssueWithUiAsync(
    XTaskQueueHandle queue,
    const char* narrowUrl = nullptr,
    const wchar_t* wideUrl = nullptr,
    bool useUtf16 = false)
{
    auto resolveAsyncBlock = std::make_unique<XAsyncBlock>();
    ZeroMemory(resolveAsyncBlock.get(), sizeof(*resolveAsyncBlock));
    resolveAsyncBlock->queue = queue;
    resolveAsyncBlock->context = this;

    if (useUtf16)
    {
        resolveAsyncBlock->callback = [](XAsyncBlock* ab)
        {
            auto asyncBlock = std::unique_ptr<XAsyncBlock>(ab);
            LOG_IF_FAILED(static_cast<User*>(ab->context)->ResolveUserIssueUtf16Complete(ab));
        };

        if (SUCCEEDED_LOG(XUserResolveIssueWithUiUtf16Async(
            _handle.get(),
            wideUrl,
            resolveAsyncBlock.get())))
        {
            // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
            // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
            resolveAsyncBlock.release();
        }
    }
    else
    {
        resolveAsyncBlock->callback = [](XAsyncBlock* ab)
        {
            auto asyncBlock = std::unique_ptr<XAsyncBlock>(ab);
            LOG_IF_FAILED(static_cast<User*>(ab->context)->ResolveUserIssueComplete(ab));
        };

        if (SUCCEEDED_LOG(XUserResolveIssueWithUiAsync(
            _handle.get(),
            narrowUrl,
            resolveAsyncBlock.get())))
        {
            // The call succeeded, so release the std::unique_ptr ownership of XAsyncBlock* since the callback will take over ownership.
            // If the call fails, the std::unique_ptr will keep ownership and delete the XAsyncBlock*
            resolveAsyncBlock.release();
        }
    }

    return S_OK;
}
```

## 요구 사항

**헤더:** XUser.h

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

**지원되는 플랫폼:** Windows, Steam Deck, XBOX One 계열 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [Using the Game Chat 2 C++ API](/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2)

## 함께 보기

[XUser](/reference/system/xuser/xuser_members)

[XUserResolveIssueWithUiResult](/reference/system/xuser/functions/xuserresolveissuewithuiresult)

[XUserResolveIssueWithUiUtf16Async](/reference/system/xuser/functions/xuserresolveissuewithuiutf16async)


## Related topics

- [XUserResolveIssueWithUiResult](/ko/reference/system/xuser/functions/xuserresolveissuewithuiresult.md)
- [XUserResolveIssueWithUiUtf16Async](/ko/reference/system/xuser/functions/xuserresolveissuewithuiutf16async.md)
- [XUserResolveIssueWithUiUtf16Result](/ko/reference/system/xuser/functions/xuserresolveissuewithuiutf16result.md)
- [XUserGetAgeGroup](/ko/reference/system/xuser/functions/xusergetagegroup.md)
- [XUserGetId](/ko/reference/system/xuser/functions/xusergetid.md)
