RegisterLampArrayStatusCallback
Registers a callback function to be invoked each time the LampArray status changes.Syntax
Parameters
callbackFunc _In_ Type: LampArrayStatusCallback A caller-defined function to register. It will be invoked when LampArray status changes. enumerationKindType: LampArrayEnumerationKind Specifies the desired device enumeration behavior of the LampArrayStatusCallback function. 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
The LampArrayEnumerationKind parameter allows the caller to specify how it should receive callbacks for any LampArray devices that are attached at the time of this call. If LampArrayEnumerationKind::Blocking is selected, the RegisterLampArrayStatusCallback 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 status notifications. These events are infrequent, and the worker thread otherwise remains in a wait state. After the registration call returns, all subsequent LampArrayStatusCallbacks will be invoked sequentially on this worker thread. If LampArrayEnumerationKind::Async is specified, this call will return immediately, and any LampArrays connected at the time of the call will be enumerated on the aforementioned LampArray callback worker thread. The following code is an example of registering and unregistering a LampArrayStatusCallback function:Requirements
Header: LampArray.h Library: xgameplatform.lib Supported platforms: XBOX One family consoles and XBOX Series consolesSee also
Lighting API OverviewLighting Basics
LampArrayStatusCallback
UnregisterLampArrayCallback
LampArrayEnumerationKind
