[resend 1/8] reg: Add system error printing function
stefandoesinger at gmail.com
Tue Feb 17 04:15:25 CST 2015
-----BEGIN PGP SIGNED MESSAGE-----
Am 2015-02-17 um 10:56 schrieb Alexandre Julliard:
> I don't think that's an improvement. There may be a need for
> generic Win32 error printing through FormatMessage for unknown
> codes, but I don't see why you'd want to route all errors through
> it. In particular, having to make up your own Win32 error codes
> only to convert them back to string ids is quite ugly.
This kind of setup was originally my idea, so I might as well answer
this question myself:
The basic plan is to let the advapi32 do as much of the error checking
as possible and use the return value from the Reg* functions to tell
the user what went wrong. There are a handful of failure modes that
only apply to reg.exe and not advapi32 - in particular the currently
unimplemented remote access and trailing backslashes.
The default path with FormatMessage is a fallback for unexpected
errors. This could be an ERR if it is preferred, but an ERR won't be
visible in the program output.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the wine-devel