-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-17 20:38, schrieb Jonathan Vollebregt:
- /* REG_MULTI_SZ */
- run_reg_exe("reg add HKCU\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d "three\0little\0strings" /f", &r);
- ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
- memcpy(buffer, "three", 6);
- memcpy(buffer+6, "little", 7);
- memcpy(buffer+6+7, "strings", 8);
- buffer[21] = 0;
- verify_reg(hkey, "multi0", REG_MULTI_SZ, buffer, 22, TODO_REG_SIZE);
I think this shoudl work as well: const char buffer[] = "three\0little\0strings\0";
verify_reg(hkey, "multi0", REG_MULTI_SZ, buffer, sizeof(buffer), TODO_REG_SIZE);
Notice the [] to declare an array so sizeof returns the proper value. strlen will not work.
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "#randomgibberish" /d "three#little#strings" /f", &r);
- todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "" /d "three#little#strings" /f", &r);
- todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "#" /d "##" /f", &r);
- todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "#" /d "two##strings" /f", &r);
- todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
- run_reg_exe("reg add HKCU\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s "#" /d "#a" /f", &r);
- todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
What about the following cases?
/s ABC /d threeABClittleABCstrings /s \0 /d three\0little\0strings