473,511 Members | 14,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1138
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
1478
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
2107
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
1075
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
2316
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
5137
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
1293
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
205
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
2336
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
1246
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
1526
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
7137
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
7349
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,...
1
7074
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
5659
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
5063
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
4734
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
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.