【VB技巧】VB Shell并等待程序/进程执行完毕

  • A+
所属分类:lcx

    VB Shell并等待程序/进程执行完毕,VB Shell并等待程序执行完毕,VB Shell并等待进程执行完毕,VB 等待程序/进程执行完毕,VB 等待进程执行完毕,VB 等待程序执行完毕,VB 等待程序执行完,VB 等待进程执行完,VB 等待程序,VB 等待进程,VB dcWaitForSingleObject,VB dcWaitForSingleObject Proc.hProcess,VB Proc.hProcess,VB OpenProcess,dcWaitForSingleObject OpenProcess(SYNCHRONIZE, 0, Shell("cmd.exe", vbNormalFocus)), 10000。

VB Shell并等待程序/进程执行完毕,VB等待进程执行完毕,VB等待执行结束:

Private Declare Function dcWaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
dcWaitForSingleObject Proc.hProcess, 900000 '进程,等待时间

示例:
Private Declare Function dcWaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Const SYNCHRONIZE = &H100000
dcWaitForSingleObject OpenProcess(SYNCHRONIZE, 0, Shell("cmd.exe", vbNormalFocus)), 10000 '执行cmd.exe,并等待其结束。

文章来源于lcx.cc:【VB技巧】VB Shell并等待程序/进程执行完毕

相关推荐: 【公告】T00ls.Net安全技术交流论坛总规则

    T00ls是技术性论坛,是国内为数不多的讨论气氛浓厚、研究范围较广的信息安全技术交流平台,无任何盈利、商业与政府性质,本着“低调求发展”的理念低调和谐健康发展!此帖总结下 T00ls.Net 论坛的规则,并将一直进行更新。 一、论坛总规则(在T00ls…

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: