VBCreateProcess模块计算机等级考试

文章作者 100test 发表时间 2010:01:01 10:53:01
来源 100Test.Com百考试题网


  Attribute VB_Name = "Run_Command"
  Option Explicit
  Option Base 0
  Private Declare Function CreateProcess()Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, _
  ByVal lpCommandLine As String, lpProcessAttributes As SECURITY_ATTRIBUTES, lpThreadAttributes As SECURITY_ATTRIBUTES, _
  ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDirectory As String, _
  lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
  Private Declare Function CloseHandle()Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long
  Private Declare Function ReadFile()Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Long) As Long
  Private Declare Function WaitForSingleObject()Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
  Private Declare Function CreatePipe()Function CreatePipe Lib "kernel32" (phReadPipe As Long, phWritePipe As Long, lpPipeAttributes As SECURITY_ATTRIBUTES, ByVal nSize As Long) As Long
  Private Type STARTUPINFO
  cb As Long
  lpReserved As String
  lpDesktop As String
  lpTitle As String
  dwX As Long
  dwY As Long
  dwXSize As Long
  dwYSize As Long
  dwXCountChars As Long
  dwYCountChars As Long
  dwFillAttribute As Long
  dwFlags As Long
  wShowWindow As Integer
  cbReserved2 As Integer
  lpReserved2 As Long
  hStdInput As Long
  hStdOutput As Long
  hStdError As Long
  End Type
  Private Type PROCESS_INFORMATION
  hProcess As Long
  hThread As Long
  dwProcessId As Long
  dwThreadId As Long
  End Type
  Private Type SECURITY_ATTRIBUTES
  nLength As Long
  lpSecurityDescriptor As Long
  bInheritHandle As Long
  End Type
  Private Const NORMAL_PRIORITY_CLASS As Long =

相关文章


VB的灵魂之对象使用(一)计算机等级考试
VB中的用户界面设计计算机等级考试
计算机等级考试二级VB模拟试题十及答案解析计算机等级考试
计算机等级考试二级VB模拟试题九及答案解析计算机等级考试
VBCreateProcess模块计算机等级考试
VBBase64编码类代码计算机等级考试
VBBase64编解码计算机等级考试
VB进程权限提升代码计算机等级考试
VB获取所有逻辑磁盘信息代码计算机等级考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛