New Windows API gpgrt_w32_reg_get_string.
* src/w32-reg.c (_gpgrt_w32_reg_query_string): Implement a prefix for root and consider an empty string for root also HKCU. * src/visibility.c (gpgrt_w32_reg_get_string): New. * src/gpg-error.def.in: Add new function. * src/gpg-error.c (my_strusage): Print the Windows version (32 or 64 bit) of the binary. (main): New command --getreg.
This function is already used internally and we have a similar
function in GnuPG. It is much more convenient to work with this
function.
Also we can now pass the KEY_WOW64_32KEY andKEY_WOW64_64KEY flags to
the registry read functions. For example
!32key!HKLM\software\gnu\gnupg:ntdskeyserver
returns the value using the KEY_WOW64_32KEY flag; likewise for
!64key!. If !cross! is used the reversed flag of the binary type is
used.