That's not what I expected, but I guess we're getting somewhere.
The first result looks like it should have actually worked, have you tried to see if it updates the wallpaper?
Error 1400 is
ERROR_INVALID_WINDOW_HANDLE which is
very strange in this context since we're broadcasting to all windows, it's as if it isn't recognizing HWND_BROADCAST as a valid value.
Could you try passing -1 directly to SendMessage instead of the HWND_BROADCAST constant to see if that changes something perhaps?
Like so:
lngResult = SendMessage(-1, WM_SETTINGCHANGE, 0, 0)
I dunk for bananas - 2023-03-19 7:33 PM
I checked again in CE 5's winuser.h, and SPI_SETDESKWALLPAPER is absolutely defined there, so it should be still available. Weird

It could be that the value is still defined but SystemParametersInfo is not recognizing it anymore.
Edited by WinCEDev 2023-03-19 6:49 PM