-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I conceptually like this function.
Am 2014-11-04 21:15, schrieb Jonathan Vollebregt:
+static int reg_print_error(LONG error_code)
You are mixing LSTATUS and LONG in your code. It seems like this is ultimately Microsoft's fault since it defines LSTATUS in reg.h but puts error values from winerror.h into it. Since LSTATUS is defined as LONG it is not a big deal, but please pick one and try to be consistent. My choice would be LSTATUS since it is returned from the registry functions, but if you have a reason to choose LONG that's OK with me.
case ERROR_FILE_NOT_FOUND:
return reg_message(STRING_CANNOT_FIND);
case ERROR_BADKEY:
return reg_message(STRING_INVALID_KEY);
These are dead code, please add them in the patches that call them.
- STRING_ERROR, "Error: "
Wouldn't "Unexpected error" be a better fit?