aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-reg.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New Windows API gpgrt_w32_reg_get_string.Werner Koch2024-12-121-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* w32: Convert REG_DWORD values to a string.Werner Koch2022-08-021-0/+15
| | | | * src/w32-reg.c (_gpgrt_w32_reg_query_string): Handle REG_DWORD
* Remove Windows CE support.NIIBE Yutaka2022-06-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * contrib/*: Remove. * Makefile.am: Remove contrib. * autogen.sh: Remove Windows CE support. * configure.ac (have_w32ce_system): Remove. * src/Makefile.am [HAVE_W32CE_SYSTEM] (extra_cppflags): Remove. (gpg_extra_headers): Remove. (EXTRA_DIST): Remove mkw32errmap.c and w32ce-add.h (BUILT_SOURCES): Remove mkw32errmap.map.c. (tmp_files): Remove mkw32errmap.tab.h mkw32errmap.map.c (CLEANFILES): Likewise. * src/estream-printf.c [HAVE_W32CE_SYSTEM]: Remove. * src/estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/gpg-error.def.in [HAVE_W32CE_SYSTEM]: Remove. * src/gpgrt-int.h: Fix comment. * src/init.c [HAVE_W32CE_SYSTEM]: Remove. * src/init.h [HAVE_W32CE_SYSTEM]: Remove. * src/mkheader.c: Remove Windows CE support. * src/mkw32errmap.c, src/w32ce-add.h: Remove. * src/spawn-posix.c [HAVE_W32CE_SYSTEM]: Remove. * src/spawn-w32.c [HAVE_W32CE_SYSTEM]: Remove. * src/sysutils.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-estream.c [HAVE_W32CE_SYSTEM]: Remove. * src/w32-reg.c [HAVE_W32CE_SYSTEM]: Remove. * tests/Makefile.am [HAVE_W32CE_SYSTEM]: Remove. -- GnuPG-bug-id: 5912 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: new internal function _gpgrt_w32_reg_get_string.Werner Koch2021-10-221-6/+55
| | | | | | | | | | * src/w32-reg.c (_gpgrt_w32_reg_query_string): Allow abbreviated root names. (_gpgrt_w32_reg_get_string): New. -- This should eventually be made public. Noet that we have a copy in gnupg.
* doc: Add a comment to the Windows registry functions.Werner Koch2017-11-271-1/+5
| | | | --
* w32: Add new API fucntion gpgrt_w32_reg_query_string.Werner Koch2017-11-171-0/+150
* src/w32-reg.c: New. * src/w32-add.h: Add gpgrt_w32_reg_query_string. * src/visibility.c (gpgrt_w32_reg_query_string): New wrapper. * src/gpg-error.def.in: Add gpgrt_w32_reg_query_string. * configure.ac (ac_check_funcs): Add stpcpy. * src/Makefile.am (arch_sources): Add w32-reg.c (socklibs): New. (libgpg_error_la_LIBADD): Add socklibs. * src/gpgrt-int.h (xfree, xtrymalloc, xtrycalloc) (xtryrealloc): New internal macros. (_gpgrt_stpcpy, stpcpy): New replacement fucntion and macro. * src/logging.c (_gpgrt_logv_internal): Use new registry query function and add standard registry key. -- This also fixes the build failure on Widnwos for logging.c. The code for gpgrt_w32_reg_query_string has been taken from the function read_w32_registry_string in w32-utils.c in the GPGME package. Signed-off-by: Werner Koch <[email protected]>