Skip to main content

RegisterLampArrayCallback

Registers a callback function to be invoked each time a LampArray is connected or disconnected from the system.

Syntax

Parameters

lampArrayCallback   _In_ Type: LampArrayCallback A caller-defined function to register. It will be invoked when LampArrays are connected or disconnected from the system. context   _In_opt_
Type: void*
A pointer to an object containing relevant information for the callback function. Typically, this is the calling object. callbackToken   _Out_ _Result_zeroonfailure_ Type: LampArrayCallbackToken* A token value that can be used to unregister the callback function at a later time.

Return value

Type: HRESULT Function result.

Remarks

If any LampArray devices are attached at the time a callback is registered, the RegisterLampArrayCallback function will block until that callback is invoked for each attached device (meaning the callback will be invoked on the calling thread). When the first callback is registered, the LampArray API starts a worker thread to handle ILampArray device attach and removal notifications. These events are infrequent, and the worker thread otherwise remains in a wait state. After the registration call returns, all subsequent LampArrayCallbacks will be invoked sequentially on this worker thread. 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
UnregisterLampArrayCallback
Last modified on August 20, 2026