I'm testing the TerminateProcess API and found the TLIST sample in microsoft's MSDN. I found a similar VB application. With the VB app and Notepad running on a windows 98 system, I launched the application that goes along with TLIST. The code was Kill.C. This code uses TerminateProcess and will indeed terminate notepad. When I tried it on the VB application and stepped through TerminateProcess, the function reported success but the application remained.

I did compile the VB app and wasn't in the Visual Basic Debugger. I've seen very little in the way of explanation on microsoft's page as to why. I looked on another message board that will remain nameless but was only given a link to the TerminateProcess page in the MSDN. The only line that seems to mean anything is:

Terminating a process does not necessarily remove the process object from the system. A process object is deleted when the last handle to the process is closed.

Does this mean I have to enumerate all handles for the application? Is it an issue where there may be a DLL holding this application open somehow? If the latter is the case, How can I enumerate these on 95/98 systems. Does anyone know a process for 95/98 that is similar to t5he NT EnumProcessModules function.

Help!...I'm stuck!