MOZGIII / wallpaper-rs

Low-level and powerful rust crates for wallpaper manipulation.
3 stars 0 forks source link

windows-shobjidl example gives no output #3

Open phanirithvij opened 4 years ago

phanirithvij commented 4 years ago

I tried running your example cargo run --example wallpaper-shobjidl it gave no output.

 cargo run --example wallpaper-shobjidl
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `D:\Projects\fun\experiments\wallpaper-rs\target\debug\examples\wallpaper-shobjidl.exe`

The other one is working cargo run --example wallpaper-user32 which gave the wallpaper path.

MOZGIII commented 4 years ago

I'll look into it. There's been quite a lot of turbulence with this project some time ago, and I didn't manage to revisit it yet.

MOZGIII commented 4 years ago

Works on my end:

$ cargo run --example  wallpaper-shobjidl
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `C:\Users\MOZGIII\Desktop\wallpaper-rs\target\debug\examples\wallpaper-shobjidl.exe`
C:\Users\MOZGIII\AppData\Local\Temp\bm6yqr.jpg

I wonder what could be causing this. Maybe the Windows API does return an empty result?

MOZGIII commented 4 years ago

It might just be the behavior of Windows API. For me both examples work consistently. Can you try setting the wallpaper via one of the examples and then cargo run --example wallpaper-shobjidl again?

phanirithvij commented 4 years ago

When using the SlideShow option wallpaper-shobjidl doesn't work. It works with single images.

phanirithvij commented 4 years ago

I have a cpp implementation to get the wallpaper using IDesktopWallpaper if that can help you debug if you're able to replicate this issue. wallpaper.zip

MOZGIII commented 4 years ago

Please provide a step-by-step guide to reproduce the issue if you know what's causing it.