none
Getting last bootup time C#? RRS feed

Answers

All replies

  • Hi,

    you can use WMI. You will find an example here : Use WMI to get the system's up-time

    Regards

    Thursday, December 16, 2010 1:07 PM
  •   [System.Runtime.InteropServices.DllImport("kernel32", EntryPoint="GetTickCount", ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Ansi, SetLastError=true)]
      
    public static extern int GetTickCount(); //milliseconds
      [System.Runtime.InteropServices.DllImport("kernel32", EntryPoint="GetTickCount64", ExactSpelling=
    true, CharSet=System.Runtime.InteropServices.CharSet.Ansi, SetLastError=true)]
      
    public static extern long GetTickCount64(); //milliseconds
    Thursday, December 16, 2010 1:08 PM
  • Of course - thanks!
    • Marked as answer by PeterPlatypus Thursday, December 16, 2010 3:12 PM
    Thursday, December 16, 2010 3:12 PM