search for: formatmessage

Displaying 20 results from an estimated 32 matches for "formatmessage".

2006 Dec 17
0
FormatMessage issue in eventlog.rb - more clues
Hi all, Ok, I''m getting closer on this get_description failure and the mscoree.dll file. It has something to do with the way we''re calling FormatMessage(). Consider the following C code, which behaves exactly the 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];...
2006 Aug 08
2
win32 eventlog dup
That''s weird. Line 296 is just a call to FormatMessage(). Folks on the mailing list - could this be a wide character issue? Buffer too small maybe? Regards, Dan Pe?a wrote: > forgot: > > it segfaults on the win2k3 server (domain controller). > > it has _not_ segfault on my winxp pro though. > > > > # -----Original Mess...
2006 May 17
1
Need a little help with the pure Ruby win32-eventlog
...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. * I''m not sure how to properly populate or pack/unpack the va_list, which is later passed to the FormatMessage() function. Please take a look. Thanks, Dan
2006 May 17
3
Need a little help with the pureRubywin32-eventlog
...ions. Take a look at the end of the "while dwread > > > 0" loop. I > > > get some records, but not all of them. > > > > > > * I''m not sure how to properly populate or pack/unpack > the va_list, > > > which is later passed to the FormatMessage() function. > > > > > > Please take a look. > > > > > > Thanks, > > > > > > Dan > > > > Here is the patch: > > <snip> > > Thanks. That mostly seems to work. However, I''m hitting a > segfault after...
2020 May 22
0
Wine release 5.9
...ws2_32: Don't set output length in WSAStringToAddress on error. Alexandre Julliard (54): ntdll/tests: Enable RtlDowncaseUnicodeString() test. ntdll: Add a few printf functions. ntdll: Merge new features from msvcrt's printf implementation. ntdll: Implement RtlFormatMessage(). ntdll/tests: Add some printf tests. ntdll/tests: Add tests for RtlFormatMessage(). kernelbase: Reimplement FormatMessageA/W using RtlFormatMessage(). kernel32/tests: Add some tests for FormatMessageA/W buffer sizes. attrib: FormatMessage() now reports ERROR_NO_WORK_...
2008 Jun 18
2
[ win32utils-Bugs-20722 ] Windows::Error.get_last_error only returns the first character (PATCH)
...XP SP3, ruby 1.8.6-p114, windows-pr-0.8.6 Repro code: require ''windows/error'' class ErrTest; include Windows::Error; end et = ErrTest.new puts et.get_last_error(100) Expected result (on english Win XP SP3): Cannot create another system semaphore. Actual result: C It seems that FormatMessage is being bound to the widechar variant (FormatMessageW) instead of the narrow variant (FormatMessageA). I''ve included a simple patch, below. For test_error.rb, I''d recommend adding a simple test that verifies the length of the returned message for a known error code is greater t...
2006 May 17
0
Need a little help with the pure Rubywin32-eventlog
...rly between > > iterations. Take a look at the end of the "while dwread > > 0" loop. I > > get some records, but not all of them. > > > > * I''m not sure how to properly populate or pack/unpack the va_list, > > which is later passed to the FormatMessage() function. > > > > Please take a look. > > > > Thanks, > > > > Dan > > Here is the patch: <snip> Thanks. That mostly seems to work. However, I''m hitting a segfault after a few records. As far as I can tell this happens when +buf+ is em...
2007 Dec 05
21
Fwd: win32/process problem
Any ideas? ---------- Forwarded message ---------- From: Christian Kerth <christian.ke... at dynamicmedia.at> Date: Dec 5, 8:28 am Subject: win32/process problem To: comp.lang.ruby I have an application that consists of serveral independent parts. I want to use the Windows Process API to spawn the different processes. e.g. require ''rubygems'' require
2006 Dec 14
11
Tweak to win32-eventlog
...ing 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") end Where ''val'' is the result of the FormatMessage() call. I''ve attached the sample backup file he sent me t...
2009 Nov 13
0
Wine release 1.1.33
...32: Retrieve the executable information as soon as we open the file. kernel32: Set the 64-bit flag for builtin executables based on their load directory. libwine: Fix handling of precision argument in vsnprintfW. kernel32/tests: Add some tests for width and precision formatting in FormatMessage. kernel32: Reimplement the formatting of inserts in FormatMessageA. kernel32: Reimplement the formatting of inserts in FormatMessageW. kernel32: Propagate the error result from RtlFindMessage in FormatMessage. kernel32: Fix handling of width and precision arguments and remov...
2012 May 04
0
[PATCH] add (errnum) in front of windows error messages
...ea904a..405097b 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, size...
2007 Mar 29
2
Re: [Xapian-commits] 7990: trunk/xapian-core/ trunk/xapian-core/bin/ trunk/xapian-core/tests/harness/
On Thu, Mar 29, 2007 at 03:39:01PM +0100, richard wrote: > bin/xapian-tcpsrv.cc,tests/harness/testsuite.cc: First of many > parts of a large patch from Mark Hammond working towards enabling > remote databases on windows. When displaying errors which might > be socket errors, display the error number as well as the output > of strerror - on windows, strerror doesn't display
2014 Oct 31
0
Wine release 1.7.30
...comctl32: Avoid magic numbers. comctl32: Remove dead assignment in tooltips.c (Cppcheck). comctl32/tests: Remove dead assignment in comboex.c (Cppcheck). comctl32/tests: Remove a dead assignment from dpa.c (Cppcheck). Catalin Patulea (2): kernel32/tests: Add test for FormatMessage with HRESULT. kernel32: Handle win32 hresult in FormatMessage. Daniel Lehman (1): wininet: Remove custom port handling in HTTP_HandleRedirect. David Heidelberger (1): winedbg: List Dwarf2 GNU extensions as TODO to workaround spam in debug. Hans Leidekker (4): secur32/test...
2012 Sep 28
0
Wine release 1.5.14
...eEx. ddraw: Enumerate wined3d interfaces with DirectDrawEnumerateEx. kernel32: Report FILE_PERSISTENT_ACLS flag for NTFS volumes. shell32: Create the All Users Microsoft directory. Francois Gouget (35): msvcp71: Remove an unused debug channel. kernel32/tests: Add more FormatMessage() line wrapping tests. kernel32: Replace the format_message() helper macro with a static function. kernel32: There is no need to zero-fill the FormatMessage() temporary buffer. wined3d: Remove an unwanted trailing '\n' in shader_dump_register(). jscript: Make jsval_v...
2010 May 07
0
Wine release 1.1.44
...(1): ole32: Only fail on missing Implemented Categories key if we actually have categories to check. Andrew Nguyen (29): shell32/tests: Release the test desktop interface on all appropriate exit paths in ParseDisplayName tests. kernel32/tests: Remove a superfluous comment in the FormatMessage tests. kernel32: Remove superfluous heap reallocation calls in FormatMessageA/W. kernel32: Reject an insufficiently sized buffer in FormatMessageA/W. kernel32: Only check the buffer pointer in FormatMessageA if buffer allocation is requested. kernel32/tests: Add tests for bu...
2013 Jun 28
0
Wine release 1.6-rc4
...layer not working 33865 Regression in a specialized program 33883 Scirra httpapi.dll error trying to Run a game ---------------------------------------------------------------- Changes since 1.6-rc3: Alexandre Julliard (22): gdi32: Cache the font smoothing parameters. kernel32: FormatMessage precision arguments are integers. comdlg32: Add support for the CF_NOVERTFONTS flag. clock: Don't offer vertical fonts in the font dialog. notepad: Don't offer vertical fonts in the font dialog. winecfg: Don't offer vertical fonts in the font dialog. wineco...
2020 May 08
0
Wine release 5.8
...kernel32: Move some stub functions to kernelbase. kernelbase: Add CopyMemoryNonTemporal export. kernel32: Move the psapi functions to kernelbase. api-ms-win-core-windowserrorreporting-l1-1-0: Add WerUnregisterFile(). kernel32/tests: Use wide character string literals in FormatMessage() tests. kernel32/tests: Fix some incorrect FormatMessage() tests. Alistair Leslie-Hughes (3): ddraw: Make palette and remaining surface vtbls writable. dmime: Parse lyric track data. dmime: Support more common chunks. Andrew Eikum (5): include/xapo.idl: Add XAPO reg...
2018 Apr 13
0
Wine release 3.6
...nfoForDpi(). user32: Implement GetSystemMetricsForDpi(). Alistair Leslie-Hughes (16): include/ddk: Add fltkernel.h. fltmgr.sys: Add FltRegisterFilter stub. fltmgr.sys: Add FltStartFiltering stub. fltmgr.sys: Add FltUnregisterFilter stub. wininet: Add support for FormatMessage. ntoskrnl: Add PsAcquireProcessExitSynchronization/PsReleaseProcessExitSynchronization stub. ntoskrnl: Add ExfUnblockPushLock stub. ntoskrnl: Add PsGetProcessId stub. ntoskrnl: Add ObGetObjectType stub. winedevice: Improve error handling when a driver fails to load....
2017 Mar 17
0
Wine release 2.4
...ward InternetGetConnectedState to Ex function. include: Add missing connection check flags to wininet.h. iphlpapi/tests: Test route type and protocol in GetIpForwardTable. wininet/test: Improve tests for InternetGetConnectedStateEx. kernel32/tests: Add 64bit number tests for FormatMessage[A|W]. wined3d: Recognize GeForce 940M. Daniel Lehman (2): msvcrt: Add Concurrency::event stubs. msxml3: Don't QI for IPersistStream in internal_parse. Fabian Maurer (1): comctl32/taskdialog: Move TaskDialogIndirect and its tests into own source files. François Gouget...
2013 Oct 25
0
Wine release 1.7.5
...tests compilation with __WINESRC__ defined. kernel32/tests: Fix debugger tests compilation with __WINESRC__ defined. kernel32/tests: Fix fiber tests compilation with __WINESRC__ defined. kernel32/tests: Fix file tests compilation with __WINESRC__ defined. kernel32/tests: Fix FormatMessage tests compilation with __WINESRC__ defined. kernel32/tests: Fix heap tests compilation with __WINESRC__ defined. kernel32/tests: Fix locale tests compilation with __WINESRC__ defined. include: Redefine security privilege names without using TEXT macro. kernel32/tests: Fix ma...