Author Topic: Why Qt4 Lib uses REGISTRY.DLL?  (Read 7467 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4714
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Why Qt4 Lib uses REGISTRY.DLL?
« on: September 29, 2015, 09:27:17 pm »
Hi

I was checking on my experiments with OS/2 VMs that the Qt apps uses "Registry.DLL" file, otherwise the Qt apps will not run.

Even that I tried to document Registry.dll on the EDM/2 I still have my doubts of what it does and to which OS/2 component should be referred to. I put is as part of the Open32 component, but now I have my doubts.  I used to have this description on this file "Windows-like registry support. Used by Open32. ".

Any comments are welcome.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #1 on: September 29, 2015, 10:31:45 pm »
I guess that Qt has functions to deal with W32-type registries.

Exehdr.exe from the toolkit lists with parameter /NO and the DLL pathname the exported funcs, among other outputs:

Code: [Select]
Exports:
 ord  obj   offset    name
  22    1  00007840  RegOpenKeyA exported, shared data
  11    1  0000754c  RegEnumKeyA exported, shared data
  25    1  00006a5c  RegOpenKeyW exported, shared data
   1    1  00006fb8  RegCloseKey exported, shared data
   3    1  00007450  RegCreateKeyA exported, shared data
  17    1  00006fa0  RegFlushKey exported, shared data
  14    1  00006720  RegEnumKeyW exported, shared data
  42    1  00007948  RegSetValueA exported, shared data
   7    1  000074d0  RegDeleteKeyA exported, shared data
   6    1  0000647c  RegCreateKeyW exported, shared data
  45    1  00006d0c  RegSetValueW exported, shared data
   8    1  000065d0  RegDeleteKeyW exported, shared data
  23    1  000070dc  RegOpenKeyExA exported, shared data
  12    1  000075d0  RegEnumKeyExA exported, shared data
  24    1  00005ea8  RegOpenKeyExW exported, shared data
  13    1  00006848  RegEnumKeyExW exported, shared data
  15    1  0000704c  RegEnumValueA exported, shared data
  16    1  00005d70  RegEnumValueW exported, shared data
  30    1  000078c0  RegQueryValueA exported, shared data
  43    1  000071e8  RegSetValueExA exported, shared data
  33    1  00006bb0  RegQueryValueW exported, shared data
  44    1  0000615c  RegSetValueExW exported, shared data
   9    1  00006fd0  RegDeleteValueA exported, shared data
   4    1  00007394  RegCreateKeyExA exported, shared data
  10    1  00005c20  RegDeleteValueW exported, shared data
   5    1  000062f0  RegCreateKeyExW exported, shared data
  26    1  00007a9c  RegQueryInfoKeyA exported, shared data
  31    1  0000715c  RegQueryValueExA exported, shared data
  27    1  00006e9c  RegQueryInfoKeyW exported, shared data
  32    1  00005ffc  RegQueryValueExW exported, shared data
  50    1  00004d74  KRegInit exported, shared data
  51    1  000051c8  KRegTerm exported, shared data

Silvan Scherrer

  • Full Member
  • ***
  • Posts: 200
  • Karma: +1/-0
    • View Profile
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #2 on: September 30, 2015, 11:34:39 am »
Hi

I was checking on my experiments with OS/2 VMs that the Qt apps uses "Registry.DLL" file, otherwise the Qt apps will not run.

Even that I tried to document Registry.dll on the EDM/2 I still have my doubts of what it does and to which OS/2 component should be referred to. I put is as part of the Open32 component, but now I have my doubts.  I used to have this description on this file "Windows-like registry support. Used by Open32. ".

Any comments are welcome.

Regards
from the readme.os2 in the section Environment variables

QT_PM_NO_REGISTRY         If set, Qt will not use the Open32 registry to store
                               application settings with QSettings. Instead, plain
                               text INI files will be used for both NativeFormat
                               and IniFormat. Due to a number of problems in the
                               Open32 registry implementation (that may easily lead
                               to registry corruption), this is the default
                               behavior if neither this nor the QT_PM_REGISTRY
                               variable is set.
   
QT_PM_REGISTRY            The opposite to the above. If set, Qt will use the
                               Open32 registry to store application settings. This
                               variable is ignored if QT_PM_NO_REGISTRY is set.

regards
Silvan
kind regards
Silvan
CTO bww bitwise works GmbH

Please help us with donations, so we can further work on OS/2 based projects. Our Shop is at https://www.bitwiseworks.com/shop/index.php

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4714
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #3 on: September 30, 2015, 11:09:33 pm »
Hi Silvan.

Thanks, I'm just checking that readme.

Does it mean that I had to put that environment variable on the config.sys?
Should it be something like "SET QT_PM_NO_REGISTRY=TRUE" ??

What I'm doing is renaming registry.dll to other name to see if the Qt app works without it.

Regards
« Last Edit: September 30, 2015, 11:12:47 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andy Willis

  • Sr. Member
  • ****
  • Posts: 292
  • Karma: +7/-0
    • View Profile
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #4 on: October 01, 2015, 11:15:19 pm »
Hi

I was checking on my experiments with OS/2 VMs that the Qt apps uses "Registry.DLL" file, otherwise the Qt apps will not run.

Even that I tried to document Registry.dll on the EDM/2 I still have my doubts of what it does and to which OS/2 component should be referred to. I put is as part of the Open32 component, but now I have my doubts.  I used to have this description on this file "Windows-like registry support. Used by Open32. ".

Any comments are welcome.

Regards
from the readme.os2 in the section Environment variables

QT_PM_NO_REGISTRY         If set, Qt will not use the Open32 registry to store
                               application settings with QSettings. Instead, plain
                               text INI files will be used for both NativeFormat
                               and IniFormat. Due to a number of problems in the
                               Open32 registry implementation (that may easily lead
                               to registry corruption), this is the default
                               behavior if neither this nor the QT_PM_REGISTRY
                               variable is set.
   
QT_PM_REGISTRY            The opposite to the above. If set, Qt will use the
                               Open32 registry to store application settings. This
                               variable is ignored if QT_PM_NO_REGISTRY is set.

regards
Silvan
This will control whether or not to use the Open32 registry but apparently the call to registry.dll is not in such a way as to load it if available or to ignore it if not.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4714
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #5 on: October 02, 2015, 09:58:42 pm »
ok, so it seems that even if I find out where should I put "QT_PM_NO_REGISTRY", it is always required for Qt to find "Registry.DLL" on the path, right?

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Why Qt4 Lib uses REGISTRY.DLL?
« Reply #6 on: October 03, 2015, 04:59:43 am »
The default is the same as having QT_PM_NO_REGISTRY in your environment so no need to set it.
In cases like this, you can set it to anything and you can put it in config.sys or just enter it at a cmd prompt and then use the same cmd prompt to launch a QT app.
QT has a hard requirement for registry.dll as it is installed by all OS/2 systems that support QT and it is more work to check for its existence and only load it when available. It is open source so you could remove the requirement and re-compile.