首页 Soft PlugIn RAN乱 Dev开发 Info资料 English WAP 留言 登陆 注册
-
Posted by Yippee | 评论(0) | 引用(0) | 阅读2315次
Winexec和shimgvw.dl

please sent the bitmap to Window Picture and FAX viewer instead of MS paint。

我看了看,应该没有什么问题的:

Windows 图片和传真查看器概述图像或图片是通常通过扫描设备(例如,数字相机、传真机或扫描仪)转换成数字化格式的照片、线条画或文本文档。可以从扫描设备下载图像并将其保存在文件夹之中。将图片下载到计算机之后,可以以幻灯片形式查看图像,也可以通过 Windows 图片和传真查看器进行查看。

rundll32.exer %Systemroot%\System32\shimgvw.dll,ImageView_Fullscreen----启动一个空白的Windows图片和传真查看器

于是我就简单的写了一下

Winexec("rundll32.exer %Systemroot%\\System32\\shimgvw.dll,ImageView_Fullscreen c:\\1.1");结果运行失败,GETLASTERROR一看,0x0000007E 找不到指定的模块。

真是非常奇怪,在开始--运行里面都是好好的,

只好老老实实:

char strexe[255];
 char strsys[255];
 GetSystemDirectoryA(strsys,255);
 strcpy(strexe,strsys);
 strcat(strexe,"\\rundll32.exe ");
 strcat(strexe,strsys);
 strcat(strexe,"\\shimgvw.dll,ImageView_Fullscreen ");
 strcat(strexe,strFile);

这些总算成功了。可是VB里面直接SHELL都是可以的

执行一个可执行文件,返回一个 Variant (Double),如果成功的话,代表这个程序的任务 ID,若不成功,则会返回 0。

如果 Shell 函数成功地执行了所要执行的文件,则它会返回程序的任务 ID。任务 ID 是一个唯一的数值,用来指明正在运行的程序。如果 Shell 函数不能打开命名的程序,则会产生错误。

注意 缺省情况下,Shell 函数是以异步方式来执行其它程序的。也就是说,用 Shell 启动的程序可能还没有完成执行过程,就已经执行到 Shell 函数之后的语句。

WinExec
The WinExec function runs the specified application.

This function is provided for compatibility with 16-bit Windows. Win32-based applications should use the CreateProcess function.

UINT WinExec(
  LPCSTR lpCmdLine,  // address of command line
  UINT uCmdShow      // window style for new application
);
 
Parameters
lpCmdLine
Pointer to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, the system searches for the executable file in this sequence:
The directory from which the application loaded.
The current directory.
The Windows system directory. TheGetSystemDirectory function retrieves the path of this directory.
The Windows directory. TheGetWindowsDirectory function retrieves the path of this directory.
The directories listed in the PATH environment variable.
uCmdShow
Specifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of theShowWindow function. For a non-Windows – based application, the PIF file, if any, for the application determines the window state.

明明说The Windows system directory. 支持系统目录的。真是奇怪。


字体:

Permanant URI永久地址 http://www.shengfang.org/blog/p/winexecshimgvw.php
Trackback URI引用地址 http://www.shengfang.org/blog/tb.php?tb_id=1122386937

2005年7月26日22:08星期二  [Dev开发] 追踪此文的RSS
提示:
此文还没有评论。

称呼:    登陆   注册
   不注册,但记住我的信息
邮件:
(非必须)
评论: [UBB代码帮助]
粗体 斜体 下划线 链接 水平线 引用



验证码: 请输入你看见的数字
关闭UBB      提交时自动将内容复制到剪贴板

公告
Fire and Motion!

统计信息
[Yippee]||[统计]||日志:1839
在线: 8||用户: 2576 [列表]
今日:2214||到访:2854068
Rss:885222||评论:1604

最新日志

最新评论

友情链接

日历

最新引用

搜索

归档

杂项
Get RSS Feed (Version 2.0)
Get Atom Feed (Version 0.3)
编码:  UTF-8