|
|
|
syscall: On Windows, Errstr FormatMessage has no values to insert.
For the Windows version of syscall Errstr, set the
FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage
Flags argument when there are no values to insert.
Patch Set 1 #Patch Set 2 : code review 1868043: syscall: On Windows, Errstr FormatMessage has no values... #Total messages: 4
|
peterGo
The FormatMessage Windows API supports dynamically formatted messages, where a variable list of arguments is ...
|
15 years, 5 months ago (2010年07月21日 05:00:05 UTC) #1 |
The FormatMessage Windows API supports dynamically formatted messages, where a variable list of arguments is used to insert values in the formatted message. For example, ERROR_WRONG_DISK = 34 "The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1." The formatting options are given in the Flags argument. If the message to be formatted has dynamic inserts, but there are no values available to be inserted, the FORMAT_MESSAGE_IGNORE_INSERTS value of Flags must be set. It's not sufficient to just set the pointer to the values to be inserted to null; it fails with ERROR_INVALID_PARAMETER, 87, "The parameter is incorrect."
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
LGTM
*** Submitted as http://code.google.com/p/go/source/detail?r=79d86caba18a *** syscall: On Windows, Errstr FormatMessage has no values to insert. For the Windows version of syscall Errstr, set the FORMAT_MESSAGE_IGNORE_INSERTS value of the FormatMessage Flags argument when there are no values to insert. R=rsc, brainman CC=golang-dev http://codereview.appspot.com/1868043 Committer: Russ Cox <rsc@golang.org>