0
我试图使用COM中公开的IDesktopWallpaper在Windows 10上推进背景幻灯片。IDesktopWallpaper AdvanceSlideshow实现
Here is the description of that native class
我使用的ComImport方法描述here。
我的代码:
var wallpaper = new DesktopWallpaperClass();
for (uint i = 0; i < wallpaper.GetMonitorDevicePathCount(); i++)
{
try
{
string path = wallpaper.GetMonitorDevicePathAt(i);
wallpaper.AdvanceSlideshow(path, DesktopSlideshowDirection.Forward);
}
catch (Exception ex)
{}
}
但有一个例外
"The method or operation is not implemented"
这是否意味着它不能在所有的工作,以AdvanceSlideShow错误的电话吗? 如果不是,我怎样才能让它推进幻灯片?
这就是我在Win10版本1607上得到的结果。虽然Enable()被声明为错误,但所有其他方法都可以。当作为第一个参数传递null时会更有趣。好吧,现在不行了,你需要微软的帮助才能成功。 –
良好的调用null。这很奇怪。路径的签名不能是字符串......嗯 – JoeWarwick