XUsers API가 E_GAMEUSER_RESOLVE_USER_ISSUE_REQUIRED 오류를 반환하는 경우, 사용자는 문제를 해결하기 위해 시스템 사용자 인터페이스(UI)와 상호 작용해야 합니다.
적절한 시스템 UI를 표시하려면 XUserResolveIssueWithUiUtf16Async를 호출합니다.비유니코드 URL로 토큰 문제를 해결하기 위한 시스템 사용자 인터페이스를 표시하려면 XUserResolveIssueWithUiAsync를 호출합니다.다음 예제에서는 URL로 토큰 문제를 해결하기 위한 시스템 UI를 표시하는 방법을 보여줍니다.
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;}