What Are The Parameters For In: Python, Ctypes.windll.user32.SystemParametersInfoA?
Solution 1:
The SystemParametersInfoA
function is a direct Windows interface. It is a C
interface that in this case we are calling from Python. But it is structured the way it is because it was designed to be called from C
. The interface can do a variety of things, and that variety is controlled by the integer value of the first parameter. In this case, the value is:
SPI_SETDESKWALLPAPER = 20
The SPI_SETDESKWALLPAPER
name is used because this is how it will be referenced in all of the Windows Documentation. The SystemParametersInfoA
function takes four parameters, the purpose of the last three vary depending on the function. In this case the 0
is unused. The purpose of the imgpath
is self evident, but it does need to be a full path. Finally, the 3
is two bit flags:
SPIF_UPDATEINIFILE = 0x01
SPIF_SENDWININICHANGE = 0x02
This (Source) also has details on sizing the wallpaper.
Post a Comment for "What Are The Parameters For In: Python, Ctypes.windll.user32.SystemParametersInfoA?"