So I\'m trying to make a Python 3.3 program to change the Windows desktop background using the ctypes module. I\'ve tested the following code in Python 2.7, and it worked pe
SystemParametersInfoA
requires a 8-bit ANSI encoded input string as a parameter, which is known as mbcs
encoding in Python.
You will have to use SystemParametersInfoW
in python3. This is because SystemParametersInfoW
takes in a UTF-16 wide string (which is wchar_t *
in C) and the ctypes
library automatically converts this passed unicode argument into c_wchar_p
.
Refer the documentation for more details.