o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

[2008] Process started/terminated event -

Hi all,

I need to know when a one of a few certain processes is started so that I can close it before it appears on the screen. Originally I was using Process.GetProcesses in a timer that runs every 50ms to check for when a new process of a certain name was started. However, not only does this result in applications that start up quickly displaying for a short time, but also the application takes up to 5% CPU time which is way too high.

So, is it possible to hook onto some event that lets you know when a process has been started or terminated? I found a few code examples on the internet in C# that use "WMI" (example) but they all seem to use what is effectively a timer so this doesn't help with either problem.


Thanks,

DragonQ.

 

[2008] Process started/terminated event -
Hi all, I need to know when a one of a few certain processes is started so that I can close it before it appears on the screen. Originally I was using Process.GetProcesses in a timer that runs every 50ms to check for when a new process of a certain name was started. However, not onl


Exe Server auto Kill when client terminated -
how to make an ActiveX Exe that will terminate automatically when the client process is terminated? my ActiveX Exe will display a form and I have tried Set the ServerObj = Nothing under the Cleint's event - "Class_Terminate" but even i close the client process, the Server


Excel Formatting - VB Process Not Terminated -
All, I need some help here. When I export data from VB to Excel, the Excel process still remain in the system (even though the Excel application is terminated visually). This only happen when I perform the cell format in the VB code (like changing the font, formatting...), but if


Creating an event handler to find out when a process starts -
Hi everyone. Me again. I have a little problem I hope somebody help me. I know how to create an event handler to a process such as notepad so that when the process is exited, some kind of event is triggered eg. private Process NPad; ... Process[] p = Process.GetProcessesByName


[2.0] Process isnt terminated fast enough -
I need to terminate a process to update it but it doesn't end fast enough and causes the update to fail. I have tried WaitForExit() in the process class but it didn't work. It waited till it was terminated but the file was still in use. Anyone know how to get around this?


Locking your app from being terminated and terminating other apps -
This may be API... Anyway, how do your lock your application from being terminated by another app/user, including 95/98/ME and NT/2K/XP, I want to modify my W32.Serflog.B removal tool so it can be run straight away normally instead of in safe mode (the virus closes it automaticall


[2008] Event on end process -
I have tried to make a program not able to be forced to close by naming it the same as a system process. However, this only works on XP, not on Vista. I don't actually mind if the program is closed but I would like something to happen when it is, thus being able to end the process is n


Close external Process... -
Is it possible to close an external process if a programm gets terminated by Task-Manager??? i tried already things like Private Sub Form_Unload() KillProcess("bla.exe") End Sub but if i do that i get the following error: Procedure declaration does not match descrip


Getting owner process (PID) -
Hello... I have the PID (or handle, or window title, or whatever you want) of a process.. And I would like to know how to find out by which process this is owned. I.e. I want to get the PID of the process that started/owns my PID. For example how do i get the PID of explorer.exe


Detect when program is terminated -
hi everyone, i'm here again, needing your help. i just want to know if there is a way fo me to detect when my application is terminated??? because if my application is terminated from the process tab in task manager, form_unload is not fired can this be done using subclassing or thro


Termination -
When a vb exe is terminated from the task manager or process list, is the Form_Terminate() event executed?


Out of process application terminated unexpectedly. -
I keep getting this message in my error log. Out of process application '/LM/W3SVC/3/Root' terminated unexpectedly. Has anybody seen this before or knows whats going on?


!!Change the Process Value in Win 2K!! -
Problem: Want to change a process value/rights so it must be closed through the programs unload procedure and not terminated. Windows allows form you to terminate a process as follows: (unless see below) Terminate Method in Class Win32_Process The Terminate WMI class


Change the Process Value in Win 2K -
Problem: Want to change a process value/rights so it must be closed through the programs unload procedure and not terminated. Windows allows form you to terminate a process as follows: (unless see below) Terminate Method in Class Win32_Process The Terminate WMI class method


Know when a Console app is terminated -
Is there an event or something I could catch that would tell me that my console app is being terminated? Like by Windows being shutdown, etc. Thanks


Howto get parent Process PID -
How can i get the PID of the Process which started me (my exe) - I'm seeking for the PID from the cmd.exe process (my program is started from an batch-job).


[2008] Detect application terminate -
I need a way to detect when my application is terminated either through the Task Manger or by shutting down Windows, so I can run some code. The FormClosing event does not seem to catch these. Is there a way that I can do this? Thanks...


question about setwindowshookex() -
Now I know setwindowshookex allows you to inject code within another process memory. But I noticed that when the process that called setwindowshookex is terminated, the dll that was injected is unloaded from the target process. Why is this? Is this just how the api works?


Kill a process that was started via another process -
Ok, I have a service application that starts a process (with the Process.Start() method) but when I shutdown my service I can issue a Process.Kill() and it does indeed kill my process but it leaves any child processes open and that begins a runaway adventure with my processor. In th


[3.0/LINQ] Event handler for when a process starts -
Hi everyone. I read about a way to create an event handler for when a running process is stopped e.g. Process x p= Process.GetProcessesByName("msnmsgr"); x= p[0]; x.EnableRaisingEvents = true; x.Exited += new EventHandler(x_Exited); However i was wondering if the


terminating application -
Sir, Please tell me as to how I can terminate an application that was started from vb using the Shell function. How do I acquire the handle to the started application so that it can be terminated. Please help me as I need this technique to be implemented. Bye and Regards Sath


VB6 - Know if my software is terminated -
Hi ... i am developing a Network Administration tool so what i need is to re-execute the software when its terminated by a user from the taskmanager or any other software . (in other words i dont want the software to be terminated) . any ideas ???


How to have event sub called from non-child process -
I have an app that needs to be notified when another app triggers an event in its COM. I've registered it and I can see the event, but when I attempt to use the event, my event sub is not triggered. How can I acces the running process' COM event in my app? The running app is not


opening program as a certain username -
How do I open a process as administrator in an account called dad for example. This is so the process cant't be terminated unless they logged with admin rights. Am using windows xp pro with vs studio 2003. Service pack 1


[2008] VB 2008 compatability issue. -
I started a big project at school in VS 2005 (VB) and I wanted to download and use VB 2008 Express Edition at home to work on it, but I was told that going from one to the other would screw up the project, so if it was started in 05 then I had to complete it in 05, if I worked on it in


[2008] Communications between programs -
Hi, I have 5 programs (exe) running at the same time, they are related, but not part of the same project... and cannot be part of the same project. I have procedure on one program, and i need that depending of the result of the program, it triggers an event on some of the other


Capture PID of Process initiating App -
Is there an API which can be used to identify the process which started a secondary application. The primary application is a purchased software package, and for help issues links to a VB application. I do not know how the call is made to start the second VB application. I have che


[2008] Task Manager - End Process -
if i use task manager to end a process (an application i have written), will the applications form_closing or MyApplication_Shutdown event fire?


[2008] [Help] Editing and Hooking Processes -
Dear users; I am a new programmer, and I am quite confused on hooking on to a process, and then editing process memory of that process. I need help noping (0x90) and probably editing values. Thanks. I am currently using VB Express 2008


q abt, sdaemon.exe,( autorestarting process) -
hi friendes i have a prog called pc security( tropsoft.com) nice one. well, one of the exe file it include is ,, sdaemon.exe pc security puts its path in autostarting in regedit .. but i stopped it doin so It is for refreshing the icon of pc security in the systray of


[2008] Getting the ID of a process when another process has the same name -
Hello everyone! I am using Microsoft Visual Basic 2008 Express Edition. There are two processes with the same name. How do I get the ID of one of those processes? Both processes have different file paths, so would it be possible to get the ID of a process with the specified file path?


vb 6 vs. vb 2008 xe -
in case anybody is wondering, the flexgrid(with vb 2008 xe power packs) available in vb 2008 xe works the same(for the most part) but it is much slower to load to the point it is almost unusable if you have over 5000 records to load. is there anybody here like me that is in the pr


Individual Process Memory Usage -
I searched through the forums and I didn't find anything except one to tell either the global memory usage or the CPU usage. Well, I heard that this is difficult to do in Visual Basic, but I am searching to get the individual amount of memory used by a process, which is then display


Detect if a process has ended from using End Process -
Is there a windows event that is being raised when a certain process is being end by using End Process from the task manager?


Checking Process ID still running -
Hi y'all. Having started a process using Shell(), which returns me the process ID, how can I check whether or not the process is still running? I know I can look for an app with a certain string title but I may have more than one running with the same name and I need to be able to di


[2005] Hide window of a process that has already started -
I did some searching on the subject, and all I could find was how to hide the window of a process that YOU are starting. Is there anyway to hide the window of a process that is already started?


Handling a long process -
As part of my app, I need to process a file the user uploads, which could take some time. So far I'm redirecting to a page that has an animated gif of a never ending progress bar, but I'm wondering what to do from there. I can't really start my long process in the PageLoad event, be


Check log file -
I need to check a txt file for a certain value and if that value is found to write to result to a txt file. The tricky part is that it is a on going log file and the entry would be in there from the previous day. For instance here is a copy of part of the log 08/10/05 01:36:14 Fini


triggering event while another event is processing -
I have an event called winsock1_DataArrival(). If this event is triggered while the previous event didn't finish processing yet, what happens to this new event? Does it get process or is skipped? Thanks.


How to find the time when a session was terminated -
How can I find the time when a session was terminated? Is there any built in functionality in ASP.NET to find it? And if it is not, how can I find that event? The visitor can type another URL address in a browser, or select any site from ‘Favorites’ folder, or click on a button ‘