winExec程序及接口的功能是什么?

来源:百度知道 编辑:UC知道 时间:2024/05/29 03:05:34
每个形式参数的作用是什么啊???

先谢谢各位大侠了,小弟急用啊!!!!

概述
WinExec
VB声明
2注意
该函数只提供对16位机子的兼容。应用程序应该使用CreateProcess函数。
Declare Function WinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long
说明
运行指定的程序
返回值
Long,大于31表示成功,请参考FindExecutable函数
参数表
参数 类型及说明
lpCmdLine String,包含要执行的命令行
nCmdShow Long,定义了以怎样的形式启动程序的常数值。参考ShowWindow函数的nCmdShow参数
注解
请参考对CreateProcess函数的说明,了解在目录中查找指定文件的顺序
VC中如何使用
WINSHELLAPI void WINAPI WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
WINSHELLAPI void WINAPI WinExecErrorW(HWND hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
参数说明:
hwnd,窗口句柄,一般为NULL。
error,出错信息。
lpstrFileName 文件名。
lpstrTitle标题名。
使用WinExec命令
⑴ 函数原型:
UINT Win Exec(LPCSTR lpCmdLine, UINT uCmdShow);
⑵ 参数:
lpCmdLine:指向一个空结束的字符串,串中包含将要执行的应用程序的命令行(文件名加上可选参数)。
uCmdShow:定义Windows应用程序的窗口如何显示,并为CreateProcess函数提供STARTU