在 NT 下如何關掉 (Terminate) 用 shell 啟動的程式?(編號:2211)

各為先進
小弟試著在 NT 下把自己用 VB5 關掉自己叫出的程式,
可是試了半天,關都關不了,不知道是那處出了問題,
以下程式是參考 "VB 心得筆記" 內的 "使Shell指令具Wait功能"
一般宣告如下:
Private Declare Function OpenProcess Lib "kernel32" _
(ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, _
  ByVal dwProcessId As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" _
(ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" _
(ByVal hObject As Long) As Long
Private Declare Function GetExitCodeProcess Lib "kernel32" _
(ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Function TerminateProcess Lib "kernel32" _
(ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function IsWindow Lib "user32" _
(ByVal hwnd As Long) As Long

Const PROCESS_QUERY_INFORMATION = &H400Const SYNCHRONIZE = &H100000
Const STILL_ALIVE = &H103Const INFINITE = &HFFFF

而叫出其它程式的碼如下:
Private Sub Command1_Click()Dim pid As Long
pid = Shell("C:\tools\spe3\pe2.exe", vbNormalFocus)
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION+SYNCHRONIZE, 0, pid)
isDone = FalseDo Call GetExitCodeProcess(hProcess, ExitCode)
Debug.Print ExitCode DoEventsLoop While ExitCode = STILL_ALIVE
Call CloseHandle(hProcess)isDone = TrueEnd Sub
強迫關掉的程式碼如下:
Private Sub Command3_Click()Dim aa As Long
If hProcess <> 0 Then
  aa = TerminateProcess(hProcess, 3838)
 End If
End Sub
可是關不掉耶,
又,文中有提到,在 NT 中可能要做些修改
"在NT中,可能您要在OpenProcess()的第一個參數要
更改成 PROCESS_QUERY_INFORMATION Or PROCESS_TERMINATE 這樣才能Work"
我改了,還是不能用耶!!是那裡出了問題嗎???
原文在此:http://hs.hosp.ncku.edu.tw/~cww/shell.htm
請大家多多幫忙,謝謝