-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
The first 7 patches look worthy of Alexandre's review.
Don't resend this yet, I'd suggest to wait for Alexandre's opinion first.
Am 2014-11-08 11:26, schrieb Jonathan Vollebregt:
- static const WCHAR empty = 0;
You could make this on the global scope, call it empty_wchar (or empty_string or something similar) and use it to replace the RegDeleteKeyA with RegDeleteKeyW. That's only a minor style suggestion though, not a requriement.
FIXME("Check for integer overflow.\n");
Print this only if i == UINT_MAX. If i is smaller you know no overflow has happened.
if (0)
return ERROR_ARITHMETIC_OVERFLOW;
...
case ERROR_NOT_NUMBER:
reg_message(STRING_NOT_INT_OR_NEG);
return;
case ERROR_ARITHMETIC_OVERFLOW:
reg_message(STRING_ERANGE);
return;
I don't like the dead code. It also seems that native prints the same error message in both cases, so you don't need to separate between underflows, overflows and strings that are not numbers.
- static const WCHAR empty = 0;
You could make this on the global scope, call it empty_wchar (or empty_string or something similar) and use it to replace the RegDeleteKeyA with RegDeleteKeyW. That's only a minor style suggestion though, not a requriement.
Or perhaps I could just replace it entirely with `(WCHAR *) "\0"` but it feels a bit hacky. Would that be allowed?
if (0)
return ERROR_ARITHMETIC_OVERFLOW;
...
case ERROR_NOT_NUMBER:
reg_message(STRING_NOT_INT_OR_NEG);
return;
case ERROR_ARITHMETIC_OVERFLOW:
reg_message(STRING_ERANGE);
return;
I don't like the dead code. It also seems that native prints the same error message in both cases, so you don't need to separate between underflows, overflows and strings that are not numbers.
Is the error message generic enough that I could just return ERROR_INVALID_DATA and let the default case handle it? (That error message is "The data is invalid." by the way)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-11-08 15:46, schrieb Jonathan Vollebregt:
Or perhaps I could just replace it entirely with `(WCHAR *) "\0"` but it feels a bit hacky. Would that be allowed?
I don't like it. Defining a static const WCHAR would be consistent with the other WCHAR strings.
Is the error message generic enough that I could just return ERROR_INVALID_DATA and let the default case handle it? (That error message is "The data is invalid." by the way)
I have a German Windows here. The message is something like "Error: Invalid Syntax. Enter a valid numerical value for '/d'."
Original German: "Fehler: ungültige Syntax. Geben Sie einen gültigen numerischen Wert für '/d' ein."