1,运行一个EXE程序
2,把这个EXE程序关闭掉
- Dim mProcID As Long
- mProcID = Shell(FileName)
- Option Explicit
- Const PROCESS_QUERY_INFORMATION = &H400
- Const PROCESS_TERMINATE = &H1
- Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
- Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
- Private Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
- Sub main()
- Dim mProcID As Long
- Dim