|
-
Jan 5th, 2001, 04:56 AM
#1
Thread Starter
Member
I'm getting pretty pissed off at the examples in MSDN never working for me. :P
I have this code STRAIGHT from MSDN:
ProcessID& = Shell("Calc.exe", vbNormalFocus)
processhandle& = OpenProcess(SYNCHRONIZE, True, ProcessID&)
MsgBox "Calculator has been launched!"
ret& = TerminateProcess(processhandle&, 0&)
ret& = CloseHandle(processhandle&)
ret& = CloseHandle(processhandle&)
MsgBox "calculator has been terminated"
Considering where its from, shouldn't it work? does this little bit of code work for anyone else?
While they're here, can anyone explain why CloseHandle is called twice, and then suggest a solution for closing something given the process ID? :P
THank you! :)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|