XUserCheckPrivilege
Determines if a user has a specific privilege.Syntax
Parameters
user _In_Type: XUserHandle A handle to the user whose privilege we are checking. options _In_
Type: XUserPrivilegeOptions User privilege options. privilege _In_
Type: XUserPrivilege The privilege to check for. hasPrivilege _Out_
Type: bool* True if the user has the specific privilege, false otherwise. reason _Out_opt_
Type: XUserPrivilegeDenyReason* The reason the user does not have the requested privilege. This value is informational only, and may be inaccurate in many scenarios. This value should not be used to make decisions in your title. Instead, use the XUserResolvePrivilegeWithUiAsync to resolve any and all privilege issues.
Return value
Type: HRESULT HRESULT success or error code.Remarks
Determines whether the user has a given XUserPrivilege.If a privilege is denied (i.e. hasPrivilege is false), the game can give the player an opportunity to resolve the privilege by calling XUserResolvePrivilegeWithUiAsync with the same privilege value. If this method returns E_GAMEUSER_RESOLVE_USER_ISSUE_REQUIRED, the game can give the player an opportunity to resolve the issue by calling XUserResolveIssueWithUiAsync.NOTE: The value returned in the reason argument is informational only, and may be inaccurate in many scenarios. This value should not be used to make decisions in your title.
