在WINDOWS XP中,“WINDOWS 图片和传真查看器”这个应该程序并没有一个真正存在的EXE文件,他是从一个DLL中调用而来的,具体调用方法如下:
我们需要用rundll32.exe这个程序来运行含有这个功能的DLL(shimgvw.dll),并附加参数ImageView_FullScreen.
CString strSystemDir;
::GetSystemDirectory(strSystemDir.GetBuffer(256), 256);
strSystemDir.ReleaseBuffer();
strPicFile = LongPathToShort(strPicFile);
strSystemDir = LongPathToShort(strSystemDir);
CString strRundll;
strRundll = strSystemDir + "//rundll32.exe";
CString strParm;
strParm.Format("%s//shimgvw.dll imageview_fullscreen %s", strSystemDir, strPicFile);
ShellExecute(NULL, "Open", strRundll, strParm, NULL, SW_SHOW);
本文介绍在Windows XP系统中使用rundll32.exe程序调用shimgvw.dll文件实现图片全屏预览的方法。通过组合特定路径与参数,可以启动系统内置的图片和传真查看器。
2179





