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,并等待其结束。 |
文章作者
Nuclear'Atk
上次更新
2010-09-25
许可协议
Nuclear'Atk(核攻击)网络安全实验室版权所有,转载请注明出处。