How to save System Log In & Log Off Times
-
Hi All, My Task in vc++ is to save System LogIn and LogOff Times ,Date in A TextFile. I have No Idea of How to Do. I search a lot in Net But Unable to get my Requirement Plz Suggest me to get rid of this. Thanks In Advance Nagaraju
-
Hi All, My Task in vc++ is to save System LogIn and LogOff Times ,Date in A TextFile. I have No Idea of How to Do. I search a lot in Net But Unable to get my Requirement Plz Suggest me to get rid of this. Thanks In Advance Nagaraju
In Windows, I think there's already a logger. check Event Viewer in 'Administrative Tools' in Control panel. If you still stick with using a text file with your app, you may consider developing an NT Service that after
startup
and beforeshutdown
of the service gets the current time and date using a time class like:CTime
and stores it in a text file. For writing a simple service Nishant.S. already wrote a perfect article here in CP.// "Life is very short and is very fragile also." Yanni
while (I'm_alive)
{
cout<<"I love programming.";
}