Skip to main content

XPackageGetWriteStats

Gets the output write statistics (writeStats).

Syntax

Parameters

writeStats   _Out_
Type: XPackageWriteStats*
Pointer to a XPackageWriteStats structure.

Return value

Type: HRESULT HRESULT success or error code. The function populates writeStats only if it succeeds.

Remarks

This function calls the system to return the write statistics for the time of the current interval. If it is successful, it populates the XPackageWriteStats structure with the output write statistics. It retrieves the current write statistics for the title, including current interval length, time elapsed in the current interval, total budget for this interval, and amount written. These statistics can be used to ensure the game does not write too much content within an interval, triggering an event that may prevent the game from passing certification.
The first interval tracked by the title does not update Time Elapsed and will not cause an exceeded event to be logged when surpassing the Budget. Once the total Budget of data has been written once, the interval will reset and the Time Elapsed value will now start updating. Future intervals in the title will then reset based on interval times and trigger the exceeded event if the Budget is surpassed.

Requirements

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

Conceptual documentation

See also

Getting started packaging titles for XBOX consoles
Overview of Packaging
XPackage
Last modified on August 20, 2026