Re: user32: Fix enumeration for EnumWindowStations and EnumDesktops, try 5
On Sat, Mar 15, 2008 at 12:15 AM, Maarten Lankhorst <m.b.lankhorst(a)gmail.com> wrote:
Fixed names to have underscores.
+static void test_enumstations(void) +{ + BOOL ret; + +#if 0 /* Crashes instead */ + SetLastError(0xbabefeed); + ret = EnumWindowStationsA(NULL, 0); + ok(!ret, "EnumWindowStationsA returned succesfully!\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); +#endif + Dead code?
On Sat, Mar 15, 2008 at 12:56 AM, John Klehm <xixsimplicityxix(a)gmail.com> wrote:
On Sat, Mar 15, 2008 at 12:15 AM, Maarten Lankhorst <m.b.lankhorst(a)gmail.com> wrote:
Fixed names to have underscores.
+static void test_enumstations(void) +{ + BOOL ret; + +#if 0 /* Crashes instead */ + SetLastError(0xbabefeed); + ret = EnumWindowStationsA(NULL, 0); + ok(!ret, "EnumWindowStationsA returned succesfully!\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); +#endif +
Dead code?
No, but he should have used if (0) instead. -- James Hawkins
Hi John, 2008/3/14, John Klehm <xixsimplicityxix(a)gmail.com>:
On Sat, Mar 15, 2008 at 12:15 AM, Maarten Lankhorst <m.b.lankhorst(a)gmail.com> wrote:
Fixed names to have underscores.
+static void test_enumstations(void) +{ + BOOL ret; + +#if 0 /* Crashes instead */ + SetLastError(0xbabefeed); + ret = EnumWindowStationsA(NULL, 0); + ok(!ret, "EnumWindowStationsA returned succesfully!\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); +#endif +
Dead code? It's just so that I know the behavior is crashing, instead of setting an error. This means that windows programs won't rely on the behavior, and that the test is not needed.
Cheers, Maarten.
participants (3)
-
James Hawkins -
John Klehm -
Maarten Lankhorst