Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to terminate a process

Status
Not open for further replies.

andz

Technical User
Feb 8, 2003
1
NZ
How do I terminate a process using api calls in VB 6?
 
Use this API declaration . . .


Public Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long


and then call it . . .


Dim lngProcessID as Long
Dim intExitCode as Integer

lngProcessID = {The Process ID that you want to end}
Call TeminiateProcess(lngProcessID,intExitCode)



Hope that helps!
- Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top