Hi all!

I am not a very smart programmer (just for hobby)
so bear with me!

I have written a small program with MFC to log my internet
connections ( date and times which are written into
a file). Tha fact is that I have to open and close it
manually, after I open and close the connection.
What I would like to do is this:

after I lauch the program, it should monitor possible
connections, so that as soon as I connect with Internet
it checks the time and when I close the connection
it stops it.

Are there functions to do this?

Thank you all in advance