Results 1 to 5 of 5

Thread: Reading Windows Registry hive files

  1. #1
    Join Date
    Jun 2015
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Post Reading Windows Registry hive files

    Hi,
    Is it possible to read the registry hive files directly from the hard disk [say from %systemroot%/system32/config location] or from the attached mirror image hard disk using QT4 ?
    If yes, then how it can be done?
    Please reply

  2. #2
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Reading Windows Registry hive files

    There is nothing in Qt to do something this specific. However, Microsoft provides some APIs to access the registry. I mentioned the Win32 API in a previous thread you created on this forum, and I suppose you checked out the registry section of this API back then. I have, and it appears that it can only be used to access the registry of the current system. I googled "win32 offline registry api" and found out that Microsoft provides another API that lets you load and inspect any registry file (for instance, one on a disk that you mount on a rescue system for offline maintenance).

  3. #3
    Join Date
    Jun 2015
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reading Windows Registry hive files

    Thanks, I will check it.

  4. #4
    Join Date
    Jun 2015
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reading Windows Registry hive files

    I have used offreg.dll . In order to make use of this dll i have modified the .pro file as below:
    TEMPLATE = app
    TARGET +=
    DEPENDPATH += .
    INCLUDEPATH += C:/DLL
    LIBS += -LC:/DLL -loffreg.dll

    # Input
    HEADERS += button.h tool.h
    SOURCES += button.cpp main.cpp tool.cpp
    And included the following code in main.cpp as follows:

    QLibrary library ("offreg.dll");
    library.oropenhive("C:\Windows\System32\Config\Sof tware");


    But i am getting error "QLibrary has no member named oropenhive"
    Can you suggest me something on this. where i am making mistake?

  5. #5
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Reading Windows Registry hive files

    Well, the error message is crystal clear. Have a look at the documentation for the QLibrary class; you will see that it has no method named "oropenhive". You need to learn C++ before you try anything with Qt.

    QLibrary is used to load a library at runtime; its resolve() method is the one that looks up a symbol and returns a pointer to it. QLibrary is used for things like plugins, that may be loaded/unloaded on demand during the execution of the program.

    In your case the library is linked with your executable, which means that it will be automatically loaded by the OS at the same time as your executable. It will be the loader's job to resolve symbols. No need for QLibrary. All you have to do in your code is include the header files and call the library's functions, such as OROpenHive.

  6. The following user says thank you to yeye_olive for this useful post:

    dinesh123 (10th December 2015)

Similar Threads

  1. Replies: 6
    Last Post: 17th December 2012, 11:53
  2. Reading .plist files on Windows
    By alexivanov91 in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2010, 10:07
  3. reading windows registry
    By bhogasena in forum Qt Programming
    Replies: 3
    Last Post: 26th January 2009, 09:36
  4. reading from registry
    By phillip_Qt in forum Newbie
    Replies: 11
    Last Post: 26th October 2007, 06:49
  5. Accessing Windows Registry
    By musaulker in forum Newbie
    Replies: 1
    Last Post: 29th March 2007, 00:32

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.