title: How to count the time a Windows users is logged in (VC++)
body: <p>I am writing a Windows service for doing Parental Control (Visual C++).<br>
  <br>
  I am having trouble with the following:<ul>
  <li>how to count the time a Windows user has been logged on today (time measured in hours)
  <li>how to trigger log-off from the user Windows account, when time per day exceeds a specified value, say 5 hours.
  </ul></p>
  
  <p>Any help is appreciated.<br>
  Regards!</p>