Resend: [Bug 2631] Trap in RegisterClassExA
Dmitry Timoshkov
dmitry at baikal.ru
Mon Feb 14 23:21:19 CST 2005
"Ann and Jason Edmeades" <us at the-edmeades.demon.co.uk> wrote:
> Make RegisterClassExA check the reserved bytes is a valid value
> Tests to confirm this behaviour
> + /* Bug 2631 - Supplying an invalid number of bytes fails */
> + cls.cbClsExtra = 0;
> + cls.cbWndExtra = -1;
> + ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)),
> + "Failed with invalid number of WndExtra bytes\n");
> +
> + cls.cbClsExtra = -1;
> + cls.cbWndExtra = 0;
> + ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)),
> + "Failed with invalid number of ClsExtra bytes\n");
> +
> + cls.cbClsExtra = -1;
> + cls.cbWndExtra = -1;
> + ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)),
> + "Failed with invalid number of ClsExtra and cbWndExtra bytes\n");
You need to set last error to some bogus value (0xdeadbeef usually works) before
every API call to ensure that it's really that API call who sets the error.
--
Dmitry.
More information about the wine-devel
mailing list