473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Catching short processes?

I have a question about system.diagnostics.process.
We can take a snapshot of the processes available, but if we
need to log the processes in a log file, how can we make sure
we do not miss any. For example, I have created a small C
program which only prints "hello", and exits. Most of the time
the process did not appear in the snapshots, even when I
was taking 1000 snapshots per second (which is the max),
any ideas?
Nov 21 '05 #1
6 1136
Hi,

Try creating a windows hook to know when a process is started.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx

Ken
-----------------------
<cooles> wrote in message news:uQ**************@TK2MSFTNGP12.phx.gbl...
I have a question about system.diagnostics.process.
We can take a snapshot of the processes available, but if we
need to log the processes in a log file, how can we make sure
we do not miss any. For example, I have created a small C
program which only prints "hello", and exits. Most of the time
the process did not appear in the snapshots, even when I
was taking 1000 snapshots per second (which is the max),
any ideas?

Nov 21 '05 #2
Are you referring to hooks?
There is no hook for process/thread creation??
Nov 21 '05 #3
Hi,

Try creating a windows hook to know when a process is started.

http://msdn.microsoft.com/msdnmag/is...e/default.aspx

Ken
-----------------------
<cooles> wrote in message news:uQ**************@TK2MSFTNGP12.phx.gbl...
I have a question about system.diagnostics.process.
We can take a snapshot of the processes available, but if we
need to log the processes in a log file, how can we make sure
we do not miss any. For example, I have created a small C
program which only prints "hello", and exits. Most of the time
the process did not appear in the snapshots, even when I
was taking 1000 snapshots per second (which is the max),
any ideas?

Nov 21 '05 #4
Are you referring to hooks?
There is no hook for process/thread creation??
Nov 21 '05 #5
Hi,

I am refering to hooks. I figured you could hook into the window
creation when the c program prints hello.

Ken
------------------
<dion> wrote in message news:OL**************@TK2MSFTNGP10.phx.gbl...
Are you referring to hooks?
There is no hook for process/thread creation??

Nov 21 '05 #6
Hi,

I am refering to hooks. I figured you could hook into the window
creation when the c program prints hello.

Ken
------------------
<dion> wrote in message news:OL**************@TK2MSFTNGP10.phx.gbl...
Are you referring to hooks?
There is no hook for process/thread creation??

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arvin Portlock | last post by:
I've written a perl cgi script but it's too slow so I need to rewrite it in C++. The perl script passes parameters to a search engine on our local filesystem and processes the results (number of...
3
by: Bryan | last post by:
I have an unknown error in some legacy code. I can catch it with catch (...), but I cannot tell what kind of error it is. Is there any base exception class (like in java) that I can try and...
0
by: Jeffrey | last post by:
hello, does somebody know how ho to catch GUI events from other processes? GUI events like these 3 for example DoubleClick Move Resize .....
7
by: cmay | last post by:
FxCop complains every time I catch System.Exception. I don't see the value in trying to catch every possible exception type (or even figuring out what exceptions can be caught) by a given block...
13
by: Chris Stankevitz | last post by:
Hi, I have a very large Visual c++ .net 2003 7.1 native c application (approximately 500,000 lines of code). This application is a simulation that frequently works with floating point numbers....
5
by: Andrea | last post by:
....without changing the data type. I have been working on this for over 5 hours, please help me so I don't have to shoot myself. It's due by midnight... Here's my code: (Variables are declared...
0
by: | last post by:
I have a question about system.diagnostics.process. We can take a snapshot of the processes available, but if we need to log the processes in a log file, how can we make sure we do not miss any....
2
by: Eric Lilja | last post by:
Hello, consider this complete program: #include <iostream> #include <string> using std::cout; using std::endl; using std::string; class Hanna {
0
by: Sam Samson | last post by:
Hi All, I wrote a little monitoring app in c# .. one of the things its supposed to do is report back how much memory the PC its on is using. my first pass at this was to iterate through the...
1
by: slowpoke115 | last post by:
I have a simple login page with 2 fields (email and password), these details are then sent to another page which processes the inputs and sends them off to a PEAR server and awaits a response, it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...
0
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...

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.