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. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,324
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

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

    I have read other keys using Qsettings , but could not do so for NetworkList available in HKLM
    What have you done, and what is the debugger telling you when you ask for one of these keys? Does you account have the admin authority to read these keys?

    Edit: from QSettings docs:

    On Windows, NativeFormat settings are stored in the following registry paths:

    HKEY_CURRENT_USER\Software\MySoft\Star Runner
    HKEY_CURRENT_USER\Software\MySoft\OrganizationDefa ults
    HKEY_LOCAL_MACHINE\Software\MySoft\Star Runner
    HKEY_LOCAL_MACHINE\Software\MySoft\OrganizationDef aults
    This implies that you cannot access an arbitrary location in the Registry using QSettings, but only one of these four locations ("MySoft" and "StarRunner" are just example names), depending on the user's access rights and whether SystemScope or UserScope is requested.

    Further edit:

    Accessing the Windows Registry Directly

    On Windows, QSettings lets you access settings that have been written with QSettings (or settings in a supported format, e.g., string data) in the system registry. This is done by constructing a QSettings object with a path in the registry and QSettings::NativeFormat.

    For example:

    QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\ Office",
    QSettings::NativeFormat);
    But this implies that you can access arbitrary keys. So I go back to my original question - what is the debugger telling you?
    Last edited by d_stranz; 15th June 2015 at 22:40.

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.