473,500 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event on process creation

3 New Member
Hi All,

One independent process is running. Is there any way available in Window to get the event in first process if some other specific process gets started by other independent application? Only the name of the process is available.

Regards,
Amit
Feb 19 '07 #1
4 2123
horace1
1,510 Recognized Expert Top Contributor
Hi All,

One independent process is running. Is there any way available in Window to get the event in first process if some other specific process gets started by other independent application? Only the name of the process is available.

Regards,
Amit
not sure what you are trying to do. You can find information about the processes running using the pstat command
http://commandwindows.com/supporttools.htm

which you could run using the system() function
Expand|Select|Wrap|Line Numbers
  1.   system("pstat > file");
  2.  
and look at the resultant file
Feb 19 '07 #2
amitgoel25aug
3 New Member
HI,

The code is written in VC++ and the platform is Window.

Actually i want to trap an event into my process whenever a new process (over which i do not have any control or created by some other application) is created.

Regrads,
amit
not sure what you are trying to do. You can find information about the processes running using the pstat command
http://commandwindows.com/supporttools.htm

which you could run using the system() function
Expand|Select|Wrap|Line Numbers
  1.   system("pstat > file");
  2.  
and look at the resultant file
Feb 19 '07 #3
horace1
1,510 Recognized Expert Top Contributor
HI,

The code is written in VC++ and the platform is Window.

Actually i want to trap an event into my process whenever a new process (over which i do not have any control or created by some other application) is created.

Regrads,
amit
there may be WIN32 functions you can call for this but as I try to avoid using Windows I cannot help. However, have alook thru
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
http://labnol.blogspot.com/2006/04/useful-windows-xp-dos-commands-tricks.html
http://www.microsoft.com/downloads/details.aspx?familyid=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en
http://commandwindows.com/supporttools.htm

alternativly you could use system to call pstat() at regular intervals to see what has changed.
Feb 19 '07 #4
Banfa
9,065 Recognized Expert Moderator Expert
There is no way to receive an event when a specific process is started because in Windows events run off handles and a process does not have a handle before it is running.

However you can enumerate the currently running processes using functions in the ToolHelp Windows Library.

Take a look at these functions

CreateToolhelp32Snapshot
CloseToolhelp32Snapshot
Process32First
Process32Next

You could then work out if the process you are interested in has started.
Feb 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
22639
by: David N | last post by:
Hi All, The OnLoad() event is invoked automatically when a form is being loaded. Do we have another event that is invoked automatically after a form has completed loading? Thanks.
3
9626
by: Daniel Clark | last post by:
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting...
5
7147
by: eitangabay | last post by:
Hi all . I want to know when new process has added\loaded, i looked for system event but i could not find any. Is there any way to do it ? I'm writing in c#.NET. (Process Added meand that...
2
3897
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.