windows 相片查看器
windows 相片查看器并不是一个exe,要用rundll32加载
C#的实现方法如下
public static string showPic(string bmpFile, int timeout=10000)
{
try
{
var proc = new Process();
proc.StartInfo.WorkingDirectory = file.Directory.FullName;
proc.StartInfo.FileName = "rundll32.exe";
proc.StartInfo.Arguments = @"C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen " + bmpFile;
proc.Start();
proc.WaitForExit(timeout);
return proc.ExitCode.ToString();
}
catch (Exception ex)
{
Console.WriteLine("Exception Occurred :{0},{1}", ex.Message, ex.StackTrace.ToString());
return ex.Message;
}
}