[Win32utils-devel] Tweak to win32-eventlog - SOLVED
Daniel Berger
djberg96 at gmail.com
Sun Dec 17 16:02:24 EST 2006
[I meant to CC this but accidentally left the attachment on so it got
rejected. Anyway, here's what I sent to Greg].
Greg,
I think I've solved it. It seems to be the FORMAT_MESSAGE_FROM_SYSTEM
flag. One poster claims that it doesn't actually work properly when
used with FORMAT_MESSAGE_FROM_HMODULE.
I'm not sure. From the docs for FORMAT_MESSAGE_FROM_SYSTEM:
"If this flag is specified, an application can pass the result of the
GetLastError function to retrieve the message text for a system-defined
error."
I think that's what it's doing, although I would think the app would
only set that if there was an -actual failure-. That's arguably a bug
in the .NET runtime. But whatever.
What that tells me is that the Windows Event Viewer does *not* check for
a system message. I guess now I have to decided if I should just remove
the FORMAT_MESSAGE_FROM_SYSTEM flag (which fixes your problem, btw). I
probably will, since it's a lot easier than dealing with the confusion
otherwise generated. :)
In any case, keep your eyes open for a new release soon. :)
Many thanks for the bug report. This was a tough one.
Regards,
Dan
More information about the win32utils-devel
mailing list