How to Utilize SetColor(Windows::UI::Colors::Red) from a Non-UWP and Non-C++/WinRT DLL File
Hi,
I have developed a C++ DLL without utilizing UWP or C++/WinRT. Within this DLL, I am employing Windows::Devices::Lights::LampArray^ lamp
to retrieve information about the lamp, such as lamp->IsConnected
, lamp->LampCount
, and lamp->BrightnessLevel
.
However, when attempting to invoke
lamp->SetColor(Windows::UI::Colors::Red)
to change the LED color, the LED does not change color. Debugging the driver code revealed that the SetColor()
command is not reaching to the driver. Additionally, there are no exceptions thrown since SetColor()
has a void return type.
Given my requirement to program the LED color without using UWP/WinRT, due to their tight coupling with UI elements, I seek guidance on how to effectively utilize SetColor(Windows::UI::Colors::Red)
in my Win32 DLL code without involving the UI.
I am looking for a solution where a Win32 DLL contains a SetColor()
API, and an executable can call this DLL to set the LED color.