Skip to main content

XUserCompare

Compares two user handles for equality.

Syntax

Parameters

user1   _In_opt_
Type: XUserHandle
User handle 1. user2   _In_opt_
Type: XUserHandle
User handle 2.

Return value

Type: int32_t Returns 0 if the handles are for the same user.

Remarks

An XUserHandle represents an XBox game user. Different XUserHandles can point to the same user. To see if two different XUserHandles point to the same user, call the XUserCompare function.

Requirements

Header: XUser.h Library: xgameruntime.lib Supported platforms: Windows, Steam Deck, XBOX One family consoles and XBOX Series consoles

See also

XUser XUserCloseSignOutDeferralHandle XUserCloseHandle
Last modified on August 20, 2026