Writing an event to power an event-based stat
This topic provides example code that shows how to write an event. On the service, this example code updates event-based stats based on the stat rules that you've defined in Partner Center.
Flat C API
HRESULT hr = XblEventsWriteInGameEvent(
xboxLiveContext,
"PuzzleSolved",
R"({"DifficultyLevelId":100, "GameplayModeId":"Adventure"})",
R"({"LocationX":1,"LocationY":1})"
);
For more information, see XblEventsWriteInGameEvent.