GregMaClean 0 Newbie Poster

Hello,

Although I am a student, this project is not for school. I am trying to make a program that blocks an application from running. The irritating program resists having it's process ended (it automatically restarts via another process that also cannot be terminated). However, I have found that the application can be suspended. Using System Explorer, or Process Viewer, I can find that my application will suspend the process (meaning that is suspends all of its threads), but it can't detect a suspend!

When I did a search online, I get a whole bunch of code in C++ (which I have no clue as to its workings), and nothing in VB. From one person on Stack Overflow, they said:

"If I remember correct you can use NtQuerySystemInformation for this purpose. With NtQuerySystemInformation you can get SYSTEM_PROCESS_INFORMATION structure by iterating over array of SYSTEM_PROCESS_INFORMATION and looking for the PID of the target process. You can find detailed description of SYSTEM_PROCESS_INFORMATION in Wine sources here. After you get process information structure just look at SYSTEM_THREAD_INFORMATION where you can check state of thread. For more details about structures and enums look at Wine sources." (http://stackoverflow.com/questions/4510534/how-to-find-if-the-process-is-suspended-or-not)

But it doesn't make any sense to me!?! Can anybody please help clarify this, or provide an alternative way that can work in VB.net?

Any help would be much appreciated.

Thank you,
Greg