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

# XUserIsStoreUser

> XUserIsStoreUser 的參考資料，這是 GDK XUser API 函式，用來檢查 XUser 的 MSA 是否與 PC 上登入 Microsoft Store 的帳戶相符。

# XUserIsStoreUser

檢查 XUser 的 MSA 是否與登入 Microsoft Store 的 MSA 相同。

## 語法

```cpp theme={null}
bool XUserIsStoreUser(  
         XUserHandle user
)  
```

### 參數

*user*   \_In\_opt\_\
類型：XUserHandle

使用者控制代碼。

### 傳回值

類型：bool

在主機上一律傳回 true。在 PC 上，只有在 XUser 的 MSA 與登入
Microsoft Store 的 MSA 相同時，才會傳回 true。在 PC 上，如果沒有人登入 Microsoft Store，或是 XUser 和 Microsoft Store
分別以兩個不同的 MSA 登入，則會傳回 false。

## 備註

如需如何正確使用此函式的詳細資料，請參閱
[處理 PC 上市集帳戶不相符的情況](/zh-TW/publishing/xstore-commerce/xstore-pc)。

## 需求

**標頭：** XUser.h

**程式庫：** xgameruntime.lib

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 概念文件

* [處理 PC 上市集帳戶不相符的情況](/zh-TW/publishing/xstore-commerce/xstore-pc)

## 另請參閱

[XUser](/zh-TW/reference/system/xuser/xuser_members)

[處理 PC 上市集帳戶不相符的情況](/zh-TW/publishing/xstore-commerce/xstore-pc)


## Related topics

- [XUserIsStoreUser](/es/reference/system/xuser/functions/xuserisstoreuser.md)
- [Handling mismatched store account scenarios on PC](/publishing/xstore-commerce/xstore-mismatched-accounts.md)
- [XStore on PC — DRM, license tokens, and sandboxes](/publishing/xstore-commerce/xstore-pc.md)
- [PC의 XStore — DRM, 라이선스 토큰, 샌드박스](/ko/publishing/xstore-commerce/xstore-pc.md)
- [PC 上的 XStore — DRM、许可证令牌和沙盒](/zh-CN/publishing/xstore-commerce/xstore-pc.md)
