Skip to main content

UnregisterLampArrayCallback

Unregisters a LampArray callback function.

Syntax

Parameters

callbackToken
Type: LampArrayCallbackToken
Token for the callback function to be unregistered. Generated when the function was initially registered with RegisterLampArrayCallback. timeoutInMicroseconds
Type: uint64_t
Amount of time to wait for a callback to finish so it may be unregistered.

Return value

Type: bool True if callback was unregistered successfully. False indicates an invalid callback token value, or a timeout while waiting for an in progress callback to return. A false return will still ensure no new callback will be dispatched. Callbacks already in progress will still be executed.

Remarks

It is not safe to free any resources associated with the callback (for example, unloading the DLL that hosts the callback function) until the UnregisterLampArrayCallback function successfully returns. Therefore, it is not possible to unregister a callback from within its registered callback function, and attempting to do so will terminate the process. The following code is an example of registering and unregistering a LampArray callback:

Requirements

Header: LampArray.h Library: xgameplatform.lib Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

Lighting API Overview
Lighting Basics
LampArrayCallback
RegisterLampArrayCallback
Last modified on August 20, 2026