I'm using the function SystemParametersInfo to get the desktop wallpaper and it's assumed that when adding the action SPI_GETDESKWALLPAPER to the function returns a string.
LPWSTR bgPath;
if(!SystemParametersInfo(SPI_GETDESKWALLPAPER, 0, bgPath, SPIF_UPDATEINIFILE)){
qDebug() << *bgPath;
return;
}
qDebug()<< "an error occurred";
The problem is that the function returns a numeric value (ex: 50121) instead of a string.
Is there any problem in my code?
winapitoo much, so, is it possible to give me an example of usingSystemParametersInfocorrectly?