Commit Graph

491 Commits

Author SHA1 Message Date
Hugh McMaster b2ead1ffcc reg: Abort 'add' operation when parsing command-line arguments that are not switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:12:53 +02:00
Hugh McMaster b80da20656 reg: Better indicate when a registry value is not found.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:27:16 +02:00
Hugh McMaster fbecd56db8 reg: Prepend 'reg:' to two message strings.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:26:40 +02:00
Hugh McMaster 9b7a5cfb0e reg: Add a new message to indicate when a registry key fails to import.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:26:02 +02:00
Hugh McMaster fa2ed01352 reg: Add a message to better indicate when a specified registry key is not found.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:25:24 +02:00
Hugh McMaster 4df5c1641e reg: Improve initial syntax checks during the 'export' operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:19:50 +02:00
Hugh McMaster 1b746c1e1c reg: Use wide-char string literals in export.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:19:45 +02:00
Hugh McMaster 1fadcf2409 reg: Use wide-char string literals in import.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster 0c73f95b33 reg: Use wide-char string literals.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster aaf503e1de reg: Use RegCreateKeyExW() instead of RegCreateKeyW().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster 08976b3ee0 reg: Fail if duplicate command-line switches are passed to 'reg add'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster 9138f5893c reg: Parse 'reg add' command-line arguments in add.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster 434c345e41 reg: Parse 'reg delete' command-line arguments in delete.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hugh McMaster cb749592e7 reg: Update a comment.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 18:42:47 +02:00
Hugh McMaster eee0c1f8f9 reg: Use RegOpenKeyExW() instead of RegOpenKeyW().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 18:42:47 +02:00
Hugh McMaster 2c84ec7ee0 reg: Fail if duplicate command-line switches are passed to 'reg query'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 19:53:59 +01:00
Hugh McMaster 8e7738be92 reg: Parse 'reg query' command-line arguments in query.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 19:53:57 +01:00
Hugh McMaster e319a463a2 reg: Add extended help for supported operations.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:46:23 +01:00
Hugh McMaster cd03238dd0 reg/tests: Test whether a .reg file extension is required when exporting.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:46:23 +01:00
Hugh McMaster 89251073c7 reg/tests: Test whether overwriting a registry key modifies existing keys and values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:46:23 +01:00
Hugh McMaster a87a380a75 reg/tests: Add tests for duplicate command-line switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:46:23 +01:00
Hugh McMaster be718697a2 reg: Use malloc(), realloc() and free() from stdlib.h instead of wine/heap.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:46:23 +01:00
Hugh McMaster 42420f4d6c reg: 'export' sorts before 'import'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster d37375e470 reg: Use 'argvW' array naming in export.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster 4cbf47054f reg: Move 'import' syntax checks to reg_import().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster 8801118e38 reg: Simplify basic syntax checks.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster 7803c53cfe reg: Merge common header #includes into reg.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster ab94653e8b reg: Use is_switch() where possible.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Hugh McMaster 7e7d92d5e9 reg: Split 'add' functions from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 20:40:14 +01:00
Hugh McMaster 81a3eecc3c reg: Split 'delete' functions from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 20:40:08 +01:00
Hugh McMaster b80de87216 reg: Split 'query' functions from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 20:40:02 +01:00
Hugh McMaster 272d35afc6 reg: Stop parsing REG_SZ values containing NUL character sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-12 12:49:42 +01:00
Hugh McMaster 53fd4df85f reg/tests: Try exporting registry values with escaped null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hugh McMaster 1c2b966999 reg/tests: Try importing registry files with escaped null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hugh McMaster aa98e3f6da reg/tests: Try deleting strings containing escaped null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Hugh McMaster 73f69d66b3 reg/tests: Always specify the expected exit code in error messages.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Hugh McMaster 37ad10d92a reg/tests: Update value names in 'add' overwrite test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Hugh McMaster c5b7f04eea reg/tests: Add some tests for strings containing the characters backslash zero.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Hugh McMaster f5c24e2c34 reg/tests: Group REG_SZ default value tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Hugh McMaster e3a738b156 reg/tests: Pass __FILE__ from the caller so the correct filename is shown in error logs.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Hugh McMaster 17023a8100 reg/tests: Comprehensively check for elevated privileges before starting Windows 3.1 import tests.
The existing check fails to adequately determine the program's elevation
status on systems where the test key already exists. This can cause all
Windows 3.1 import tests to fail on systems with a standard user account.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:56:28 +01:00
Hugh McMaster b369af9ac5 reg/tests: Fix copy/paste typo in reg.exe availability check.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:56:25 +01:00
Hugh McMaster 3c2db20f66 reg/tests: Rename reg.c to add.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:25:23 +01:00
Hugh McMaster cc4cc7086f reg/tests: Split 'copy' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:25:09 +01:00
Hugh McMaster 60701b0298 reg/tests: Split 'export' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:48 +01:00
Hugh McMaster fc5816a61e reg/tests: Split Windows 3.1 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:46 +01:00
Hugh McMaster 56d9d0f791 reg/tests: Split whitespace 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:44 +01:00
Hugh McMaster 2e33ab5559 reg/tests: Split first sequence of Unicode 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:37 +01:00
Hugh McMaster 58863f5331 reg/tests: Split first sequence of 'import' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:37 +01:00
Hugh McMaster 81a8938fa3 reg/tests: Split 'query' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:23 +01:00
Hugh McMaster d3f9eaeb54 reg/tests: Split 'delete' tests from reg.c.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:24:08 +01:00
Hugh McMaster 3fd57fd995 reg/tests: Add tests for forward and back slashes in key and value names.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 14:42:07 +01:00
Hugh McMaster 6c62ffeca7 reg/tests: Add additional tests with embedded NUL characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:55 +01:00
Hugh McMaster 93fbe09ed0 reg/tests: Replace RegCloseKey() with the helper function close_key().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:53 +01:00
Hugh McMaster 5cacd496a1 reg/tests: Verify registry export after each empty key test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:51 +01:00
Hugh McMaster b51b969a01 reg/tests: Always overwrite export test file during 'export' sequence.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:49 +01:00
Hugh McMaster 597a12420b reg/tests: Check for key non-existence with verify_key_nonexist().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:47 +01:00
Hugh McMaster e6e227f21d reg/tests: Move /v* syntax tests to the 'add' and 'delete' test sequences.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:45 +01:00
Hugh McMaster 405853adb5 reg/tests: Ensure test key is fully removed before each sequence begins.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:43 +01:00
Hugh McMaster add814af3e reg/tests: Check for elevated privileges before cleaning up the Windows 3.1 test key and running unit tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:22:40 +01:00
Hugh McMaster 6cf0e7fe85 reg/tests: Add initial syntax tests for 'reg copy'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 21:17:05 +01:00
Alexandre Julliard f81d15beb6 reg: FormatMessage() now reports ERROR_NO_WORK_DONE error for empty string.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:07:31 +02:00
Alexandre Julliard ed6a5e97e0 programs: Make all program entrypoints cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 17:05:47 +02:00
Alexandre Julliard a58f4abc08 makefiles: Allow using EXTRADLLFLAGS instead of APPMODE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 11:27:39 +02:00
Alexandre Julliard 1f38c1abf6 include: Add wcsicmp() inline wrapper.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Alexandre Julliard 9b63daca51 include: Default to the standards-compliant version of swprintf().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 16:46:41 +02:00
Alexandre Julliard 8268c47462 reg: Add missing null to terminate a string.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 21:47:59 +02:00
Alexandre Julliard 518a6c2d07 reg: Use C runtime wchar functions instead of wine/unicode.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 11:45:44 +02:00
Michael Stefaniuc cd8eb2445e reg: Remove redundant NULL check before heap_free().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 21:40:02 +01:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Hugh McMaster 0aead094a5 reg: Stop exporting REG_SZ data at the first NUL character.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 10:41:38 +02:00
Hugh McMaster 65717d6726 reg: Null terminate hex-formatted REG_SZ data if necessary.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Hugh McMaster 448344c5e4 reg/tests: Add tests for values with embedded null characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-19 17:38:10 +02:00
Michael Stefaniuc 6542c3e860 reg: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 09:42:12 +01:00
Alexandre Julliard 59c47c9e2c reg/tests: Get rid of version check.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-02 15:52:22 +01:00
Hugh McMaster a0a12d9f41 reg: Allow switches to be uppercase or lowercase.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 1818267639 reg/tests: Test capitalisation of switches.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 8534935492 reg: Define MAX_SUBKEY_LEN in reg.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster ecb9ce4b2c reg: Make the newline string a static global.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:04 +01:00
Hugh McMaster 72db61da97 reg: Recursively export all subkeys and data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:49 +01:00
Hugh McMaster 491801063f reg: Export REG_DWORD values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:45 +01:00
Hugh McMaster b31f16885d reg: Export hex data types.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:40 +01:00
Hugh McMaster 2af9d75ba5 reg: Export REG_SZ data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:32 +01:00
Hugh McMaster 879282ec14 reg: Export registry value names.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:27 +01:00
Hugh McMaster ab3ee817c3 reg: Export the name of the specified registry key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:11 +01:00
Hugh McMaster fefae9ca78 reg: Export the registry file header.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:07 +01:00
Hugh McMaster 49f384727b reg: Prompt the user to overwrite the export file if it already exists.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:56:00 +01:00
Hugh McMaster 17494012a0 reg: Validate the registry key before commencing the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:55:04 +01:00
Hugh McMaster e0aadc0fc7 reg: Print a more informative error message if the system key is invalid.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:55:01 +01:00
Hugh McMaster 40643a43a4 reg: Validate the system key before commencing the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:54:11 +01:00
Hugh McMaster d4255506d5 reg: Add basic syntax checks for the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:54:06 +01:00
Hugh McMaster 38954aedf5 reg: Add initial support for the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 11:54:03 +01:00
Hugh McMaster 7fb9cdf60f reg/tests: Properly escape the backslashes in an export test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-23 21:17:13 +01:00
Alexandre Julliard a37358d0f5 reg: Use WINAPIV calling convention for variadic functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 10:21:30 +01:00
Hugh McMaster c02dd08f91 reg/tests: Correctly import hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-16 15:26:34 +02:00
Hugh McMaster d75e38c718 reg/tests: Remove write_reg_file() and rewrite associated tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:10 +02:00
Hugh McMaster 6f52f666e5 reg/tests: Add more export tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:07 +02:00
Hugh McMaster 50619b6ed3 reg/tests: Add REG_NONE to the empty hex data import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:04 +02:00
Hugh McMaster e426c353fa reg/tests: Delete the export file before returning from compare_export().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:57:01 +02:00
Hugh McMaster d3ad7b1837 reg/tests: Use a helper function to open registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:56:57 +02:00
Hugh McMaster 3f7f4cdc37 reg/tests: Print an error code when CreateFile fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-13 12:56:51 +02:00
Hugh McMaster 6607065356 reg/tests: Add REG_BINARY to the empty hex data import tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 19:50:40 +02:00
Hugh McMaster 4a6fb941e5 reg/tests: Test the importing of hex values with no data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-05 19:33:08 +02:00
Hugh McMaster 04d497c18a reg/tests: Use todo_wine_if in the registry export tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-28 17:54:21 +02:00
Hugh McMaster 2ce7d1f206 reg/tests: Use a helper function to delete registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:41 +02:00
Hugh McMaster ba0a7b0f26 reg/tests: Use a helper function to delete registry values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:41 +02:00
Hugh McMaster 08a2a01974 reg/tests: Test registry export against order of data creation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:41 +02:00
Hugh McMaster 7d93b9d099 reg/tests: Test registry export with a complex data structure.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:41 +02:00
Hugh McMaster ae313198a0 reg/tests: Test registry export with a simple data structure.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-25 22:21:41 +02:00
Hugh McMaster 9ce39bd213 reg/tests: Compare registry export data with expected data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:48 +02:00
Hugh McMaster f886f9f3d8 reg/tests: Test the placement of the overwrite file flag [/y].
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:34 +02:00
Hugh McMaster bfe5fed0b3 reg/tests: Combine and rename the test_import_*str functions.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:27 +02:00
Hugh McMaster 08a7836ef3 reg/tests: Use a helper function to write registry files.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:17 +02:00
Hugh McMaster 733350b926 reg/tests: Use a helper function to add registry values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:11 +02:00
Hugh McMaster f40ef077f5 reg/tests: Use a helper function to create registry keys.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:22:05 +02:00
Hugh McMaster 41236123bb reg/tests: Add basic tests for the export operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 20:01:54 +02:00
Hugh McMaster e3395d50a7 reg/tests: Delete the test registry key before starting each test.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 17:52:19 +02:00
Hugh McMaster 39e0e81c21 reg: Null-terminate incomplete REG_EXPAND_SZ and REG_MULTI_SZ Unicode data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-28 14:57:10 +02:00
Hugh McMaster 82fc4c8c62 reg: Close any open registry keys before starting the key deletion process.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:08:07 +02:00
Hugh McMaster b7c838bf98 reg/tests: Add some mixed key creation and deletion tests.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:08:01 +02:00
Hugh McMaster e0a97d32e2 reg/tests: Free the WCHAR memory buffer if CreateFile() fails.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:41:58 +09:00
Hugh McMaster c618e99475 reg/tests: Pass MultiByteToWideChar() the buffer size in characters.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:41:51 +09:00
Hugh McMaster 5266ef3bc5 reg/tests: Fix two copy/paste errors.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:29:43 +09:00
Hugh McMaster 5de883cc9f reg: Use the correct return codes during the import operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:29:31 +09:00
Hugh McMaster 56e58e47af reg: Delete registry keys via the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:29:23 +09:00
Hugh McMaster d90f2a55bf reg: Delete registry values via the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:29:16 +09:00
Hugh McMaster db98cc4ced reg: Handle unknown registry data types in the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:29:06 +09:00
Hugh McMaster 32d53681b9 reg: Import hex data via the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:28:55 +09:00
Hugh McMaster f1874c1667 reg: Import REG_DWORD data via the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:28:44 +09:00
Hugh McMaster 038f1c6986 reg: Parse data types and import REG_SZ data via the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:28:34 +09:00
Hugh McMaster 05659343c1 reg: Parse key names and value names in the state machine.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:28:24 +09:00
Hugh McMaster 3e87a70e82 reg: Introduce a partial state machine for importing Windows 3.1 registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:27:38 +09:00
Hugh McMaster aa386af42a reg: Add initial support for the import operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:25:52 +09:00
Hugh McMaster f2fbbec27d reg: Rename reg.h to resource.h.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:24:50 +09:00
Hugh McMaster c6c95a026b reg: Compile with msvcrt.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-20 09:24:50 +09:00
Hugh McMaster 8c253c464b reg: Make some variables 'static const'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 11:15:11 +09:00
Hugh McMaster 337e0f4cb2 reg: Avoid an uninitialized variable warning.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 11:15:04 +09:00
Hugh McMaster 8abec73530 reg: Dynamically allocate memory for the value name buffer when deleting all registry values in a specified key.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:56 +09:00
Hugh McMaster f95f3fb1bf reg/tests: Add tests for importing Windows 3.1 registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:56 +09:00
Hugh McMaster e7ea8380e0 reg: Use a helper function to resize a memory buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 18:18:47 +02:00
Hugh McMaster a1bc33ae5c reg: Use a helper function to free allocated memory.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 18:18:36 +02:00
Hugh McMaster a6e28cc3b4 reg: Use a helper function to allocate memory and die on failure.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 18:18:31 +02:00
Hugh McMaster 90da210cb0 reg: Account for sizeof(WCHAR) when resizing the value name buffer during the query operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-21 16:40:05 +02:00
Hugh McMaster fb22f6c416 reg: Avoid using RegQueryInfoKey() to enumerate subkeys and values in the query operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 16:27:05 +02:00
Sebastian Lackner db11f739ea reg/tests: Don't call RegCloseKey on uninitialized memory.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:53 +02:00
Hugh McMaster a0deb171e1 reg/tests: Test the effects of EOF on hex data during concatenation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Hugh McMaster 25de5c9255 reg/tests: Add some more tests for importing hex data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 48a2105e03 reg/tests: Add another test for "0x" prefixes in the hex data type.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:50:48 +02:00
Hugh McMaster 554d996c01 reg/tests: Test whether the "0x" prefix is valid when importing hex data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:48:57 +02:00
Hugh McMaster c50a1d9431 reg/tests: Test whether registry keys ending with trailing backslashes are imported and created.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-04 19:48:54 +02:00