2016 - 2024

感恩一路有你

shellexecute用法 C语言shellexecute函数的用法?

浏览量:1679 时间:2021-03-16 21:26:01 作者:admin

C语言shellexecute函数的用法?

Shellexecute(hWnd hWnd,//父窗口handle lpcstr lpoperation,//操作类型lpcstr lpfile,//操作lpcstr lpparameters的文件或路径,//当lpoperation为“explore”时,指定要传递的参数,通常设置为nulllpcstr lpdirectory,//指定默认目录,通常设置为nullint nshowcmd//示例如下://调用计算器shellexecute(null,“open”)”计算.exe“,NULL,NULL,SWushownormal)//调用记事本shellexecute(NULL,”open“”记事本.EXE“,NULL,NULL,SW Function函数:你可以给它任何文件的名称,它可以识别并打开它。2函数原型:hinstanceshellexecute(hwndhwnd,lpctstrlpoperation,lpctstrlpfile,lpctstrlpparameters,lpctstrlpdirectory,intnshowcmd)3。参数说明:hWnd:用于指定父窗口句柄。当函数调用期间发生错误时,它将充当windows消息窗口的父级。Lpoperation:用于指定要执行的操作。““打开”操作是执行lpfile参数指定的程序,或打开lpfile参数指定的文件或文件夹;“打印”操作是打印lpfile参数指定的文件;“浏览”操作是浏览lpfile参数指定的文件夹。

shellexecute用法 execute函数 shellexecute 内存

版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。