Results 1 to 7 of 7

Thread: Difficulty in reading Network List and login time & logout time from the registry

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Difficulty in reading Network List and login time & logout time from the registry

    Network interfaces. QNetworkInterface, no need for Windows specific coding. If you do not wish to use the Qt class then the correct way to do it is the Windows API calls GetInterfaceInfo and/or GetAdaptersInfo (NOT reading the registry which is annoyingly variable across Win versions).

    On Windows the last login time can be had from Windows command line:
    Qt Code:
    1. rem For a local user
    2. C:\> net user dinesh123 | findstr /B /C:"Last logon"
    3. rem or if a domain is involved
    4. C:\> net user dinesh123 /domain | findstr /B /C:"Last logon"
    To copy to clipboard, switch view to plain text mode 
    You could get at this with QProcess (parse the net user command output in C++).
    Last edited by ChrisW67; 20th June 2015 at 03:57.

  2. The following user says thank you to ChrisW67 for this useful post:

    dinesh123 (23rd June 2015)

Similar Threads

  1. Replies: 3
    Last Post: 20th August 2014, 09:27
  2. QaudioOutput play buffer audio real time disconnect network ?
    By Thành Viên Mới in forum Qt Programming
    Replies: 1
    Last Post: 10th May 2011, 12:20
  3. Best way in Qt to plot curve per real-time reading?
    By Sheng in forum Qt Programming
    Replies: 1
    Last Post: 10th February 2009, 22:33
  4. QSqlDatabase Time out no network to long....
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2007, 00:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.