search for: format_message_from_system

Displaying 6 results from an estimated 6 matches for "format_message_from_system".

2006 Dec 17
0
FormatMessage issue in eventlog.rb - more clues
...e same way as the current Ruby code: #include <windows.h> #include <stdio.h> int main(){ HMODULE hmod; int rv; char buf[4096]; char* dll = "C:\\WINDOWS\\system32\\mscoree.dll"; char* va_list[3]; int flags = FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY; hmod = LoadLibraryEx(dll, 0, LOAD_LIBRARY_AS_DATAFILE); printf("HMOD: %i\n", hmod); va_list[0] = "store application started"; rv = FormatMessage( flags, hmod, 0, 0, (LPTSTR)buf...
2012 May 04
0
[PATCH] add (errnum) in front of windows error messages
...b 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -53,15 +53,17 @@ void bin2hex(char *src, char *dst, int length) { #endif const char *winerror(int err) { - static char buf[1024], *newline; + static char buf[1024], *ptr; + + ptr = buf + sprintf(buf, "(%d) ", err); if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, sizeof(buf), NULL)) { - strncpy(buf, "(unable to format errormessage)", sizeof(buf)); + NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), ptr, sizeof(buf) - (ptr - buf), NULL...
2006 May 17
1
Need a little help with the pure Ruby win32-eventlog
Hi all, I''m working on the EventLog#read method for the pure Ruby version of win32-eventlog, but I''m stuck on the get_description private method. Here are the problems: * I don''t think I''m advancing the EVENTLOGRECORD properly between iterations. Take a look at the end of the "while dwread > 0" loop. I get some records, but not all of them.
2006 Dec 14
11
Tweak to win32-eventlog
All, 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()
2006 May 17
3
Need a little help with the pureRubywin32-eventlog
> -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Wednesday, May 17, 2006 12:07 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] Need a little help with the > pureRubywin32-eventlog > > > >
2017 Nov 09
10
Experiment on how to improve our temporary file handing.
Currently a power failure or other hard crash can cause lld leave a temporary file around. The same is true for other llvm tools. As an example, put a breakpoint in Writer.cpp:236 ("writeBuildId()") and restart the run a few times. You will get t.tmp43a735a t.tmp4deeabb t.tmp9bacdd3 t.tmpe4115c4 t.tmpeb01fff The same would happen if there was a fatal error between the