Hugh McMaster (@hmc) commented about programs/reg/tests/add.c:
- size = sizeof(qword);
- err = RegQueryValueExA(hkey, "qword6", NULL, &type, (BYTE *)&qword, &size);
- ok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %ld\n", err);
- ok(type == REG_QWORD, "got wrong type %ld, expected %d\n", type, REG_DWORD);
- ok(size == sizeof(qword), "got wrong size %ld, expected %d\n", size, (int)sizeof(DWORD));
- ok(qword == 123, "got wrong data %I64d, expected 123\n", qword);
- run_reg_exe("reg add HKCU\" KEY_BASE " /v qword7 /t reg_qword /d 0xabcdefg /f", &r);
- ok(r == REG_EXIT_FAILURE, "got exit code %ld, expected 1\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /v qword8 /t REG_qword /d 0xdeadbeef /f", &r);
- ok(r == REG_EXIT_SUCCESS, "got exit code %ld, expected 0\n", r);
- qword = 0xdeadbeef;
- verify_reg(hkey, "qword8", REG_QWORD, &qword, sizeof(qword), 0);
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_QWORD /v qword9 /f /d -1", &r);
Same comment as above - please check the set value.