Win7系统右键预览用图片查看器打开图片,VC怎么做这一功能.因为图片查看器没有AP ,所以我没办法获得他的comand line信息.
rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen +file path CString strSystemDir;
::GetSystemDirectory(strSystemDir.GetBuffer(256), 256);
strSystemDir.ReleaseBuffer();
CString strPicFile="D:\\aa\\1.jpg";
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); 打不开系统图片查看器,原因???
rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen +file path CString strSystemDir;
::GetSystemDirectory(strSystemDir.GetBuffer(256), 256);
strSystemDir.ReleaseBuffer();
CString strPicFile="D:\\aa\\1.jpg";
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); 打不开系统图片查看器,原因???
PROCESS_INFORMATION pi = {0};
TCHAR szApp[] = {_T("rundll32.exe C:\\WINDOWS\\system32\\shimgvw.dll,ImageView_Fullscreen F:\\11.bmp")};
if(CreateProcess(NULL, szApp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
}