Hugh McMaster (@hmc) commented about programs/reg/tests/add.c:
- run_reg_exe("reg add HKCU\" KEY_BASE " /v qword4 /t REG_QWORD /d 123xyz /f", &r);
- ok(r == REG_EXIT_FAILURE, "Unexpected exit code %lu.\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /v qword5 /t reg_qword /d 12345678 /f", &r);
- ok(r == REG_EXIT_SUCCESS, "Unexpected exit code %ld.\n", r);
- qword = 12345678;
- verify_reg(hkey, "qword5", REG_QWORD, &qword, sizeof(qword), 0);
- run_reg_exe("reg add HKCU\" KEY_BASE " /v qword6 /t REG_QWORD /D 0123 /f", &r);
- ok(r == REG_EXIT_SUCCESS, "Unexpected exit code %ld.\n", r);
- 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);
This was all code to handle a failure in XP. Can you check it's still needed?