[Win32utils-devel] Tweak to win32-eventlog
djberg96 at gmail.com
Thu Dec 14 00:04:40 EST 2006
I got a bug report from Greg Holmes where the description wasn't being
returned properly. At the moment, if there's no event associated with
the event id, then the description is empty.
However, it turns out that there can still be associated information
about the event. So, I propose the following tweak to the
get_description private method:
# If FormatMessage() returned 0, but va_list isn't empty,
# then return the va_list instead.
if val == 0 && !va_list.empty?
buf = va_list.join("\n")
Where 'val' is the result of the FormatMessage() call. I've attached
the sample backup file he sent me to demonstrate the problem. The patch
above seems to work fine.
Please let me know if you have any issues with this approach. If not,
I'd like to get a release out this weekend.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4260 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20061213/0afbaba7/attachment.obj
More information about the win32utils-devel