It might require a wchar pointer. I suggest using this function first to query for the existing wallpaper. This way you'll be able to see how the path is stored in the buffer you provide.