Skip to main content

XUserCloseHandle

Closes a specific user handle.

Syntax

Parameters

user   _In_
Type: XUserHandle
The user handle to close.

Return value

Type: void

Remarks

You must call the XUserCloseHandle function just once for each XUserHandle you retrieve from an XUser API. You can also close all handles that represent the user by calling the XUserCloseHandle function. The following example demonstrates how to asynchronously add a user to a game session.

Requirements

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

Conceptual documentation

See also

XUser XUserCloseSignOutDeferralHandle XUserCompare
Last modified on August 20, 2026