CloseApp Function for VB
By Scott Feeney
sfeeney@floodlight-findings.com

Public Domain. Please E-mail me
any comments or suggestions.

The CloseApp function returns a
value of True (-1) if it works
successfully. It returns a value
of False (0) if there is any
error.

If you have error handling set to
something, you'll have to set it
again after using CloseApp.

Here is an example of usage:

Dim Result As Integer
Result = CloseApp("Calculator")
If Result = 0 Then
    MsgBox "Could not close Calculator!"
Else
    MsgBox "Calculator successfully closed"
End If
