Re: Fix to exceptions in ddtest
On Sun, Oct 12, 2008 at 09:52:06PM -0400, Chris Ahrendt wrote: > Ok I have threaded through ddraw_test adding as I had them fail a check > and a fix in dsurface.c test. The test now fails when the CreateSurface > fails. Before this there were several point in the test where the return > status was not checked. As I encountered them and they failed with an > exception I added the failure I found at other parts which did the create > surface. For some reason a 3rd and 4th surface fails on ATI. > > Addached you will find the proposed fix. > I also found a point where the code did not skip but did a goto to the > error point with the variables unitialised. > > > Chris > >From 52071bddae683a1964d64be0acbfec8d7b2c2c5e Mon Sep 17 00:00:00 2001 > From: Chris Ahrendt <[EMAIL PROTECTED]> > Date: Sun, 12 Oct 2008 21:44:21 -0400 > Subject: [PATCH] Fix to ddtest to fail test if IDirectDraw_CreateSurface > failed. > Create Surface was failing and setting the handle to the surface to null. > So when the free / release was called it threw an exception instead of > failing the test. > > --- > ok(rc==DDERR_INVALIDPARAMS,"CreateSurface returned: %x\n",rc); > - > +if (FAILED(rc)) { > + skip("failed to create surface\n"); > + return; > + } here it is _expected_ that the surface creation fails. So this code is not useful. ALso in other places. ciao, Marcus
Re: Fix to exceptions in ddtest
On Sun, Oct 12, 2008 at 8:52 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > Ok I have threaded through ddraw_test adding as I had them fail a check and > a fix in dsurface.c test. The test now fails when the CreateSurface fails. > Before this there were several point in the test where the return status was > not checked. As I encountered them and they failed with an exception I added > the failure I found at other parts which did the create surface. For some > reason a 3rd and 4th surface fails on ATI. > > Addached you will find the proposed fix. > I also found a point where the code did not skip but did a goto to the > error point with the variables unitialised. > @@ -198,7 +198,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DDERR_INVALIDPARAMS,"CreateSurface returned: %x\n",rc); - +if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } Can you see why this is wrong? You've done this in a couple other places. -- James Hawkins
Fix to exceptions in ddtest
Ok I have threaded through ddraw_test adding as I had them fail a check and a fix in dsurface.c test. The test now fails when the CreateSurface fails. Before this there were several point in the test where the return status was not checked. As I encountered them and they failed with an exception I added the failure I found at other parts which did the create surface. For some reason a 3rd and 4th surface fails on ATI. Addached you will find the proposed fix. I also found a point where the code did not skip but did a goto to the error point with the variables unitialised. Chris >From 52071bddae683a1964d64be0acbfec8d7b2c2c5e Mon Sep 17 00:00:00 2001 From: Chris Ahrendt <[EMAIL PROTECTED]> Date: Sun, 12 Oct 2008 21:44:21 -0400 Subject: [PATCH] Fix to ddtest to fail test if IDirectDraw_CreateSurface failed. Create Surface was failing and setting the handle to the surface to null. So when the free / release was called it threw an exception instead of failing the test. --- dlls/ddraw/tests/dsurface.c | 92 ++- 1 files changed, 73 insertions(+), 19 deletions(-) diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index fc7bb88..4f545d9 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -198,7 +198,10 @@ static void MipMapCreationTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpDDSMipMapTest, NULL); ok(rc==DDERR_INVALIDPARAMS,"CreateSurface returned: %x\n",rc); - +if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } /* Destroy the surface. */ if( rc == DD_OK ) IDirectDrawSurface_Release(lpDDSMipMapTest); @@ -1004,7 +1007,10 @@ static void EnumTest(void) ddsd.dwHeight = 32; rc = IDirectDraw_CreateSurface(lpDD, &ddsd, &surface, NULL); ok(rc==DD_OK,"CreateSurface returned: %x\n",rc); - +if (FAILED(rc)) { + skip("failed to create surface\n"); + return; + } memset(&ctx, 0, sizeof(ctx)); ctx.expected[0] = surface; rc = IDirectDrawSurface_GetAttachedSurface(ctx.expected[0], &ddsd.ddsCaps, &ctx.expected[1]); @@ -1055,7 +1061,10 @@ static void AttachmentTest7(void) ddsd.dwHeight = 128; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface1, NULL); ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); - +if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } /* ROOT */ num = 0; IDirectDrawSurface7_EnumAttachedSurfaces(surface1, &num, SurfaceCounter); @@ -1092,7 +1101,10 @@ static void AttachmentTest7(void) ddsd.dwHeight = 16; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface2, NULL); ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); - +if (FAILED(hr)) { + skip("failed to create surface2\n"); + return; + } hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 16x16 surface to a 128x128 texture root returned %08x\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface1); @@ -1112,7 +1124,10 @@ static void AttachmentTest7(void) ddsd.dwHeight = 16; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface2, NULL); ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); - +if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } hr = IDirectDrawSurface7_AddAttachedSurface(surface1, surface2); ok(hr == DDERR_CANNOTATTACHSURFACE, "Attaching a 16x16 offscreen plain surface to a 128x128 texture root returned %08x\n", hr); hr = IDirectDrawSurface7_AddAttachedSurface(surface2, surface1); @@ -1136,7 +1151,10 @@ static void AttachmentTest7(void) ddsd.dwBackBufferCount = 2; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface1, NULL); ok(hr==DD_OK,"CreateSurface returned: %x\n",hr); - +if (FAILED(hr)) { + skip("failed to create surface\n"); + return; + } num = 0; IDirectDrawSurface7_EnumAttachedSurfaces(surface1, &num, SurfaceCounter); ok(num == 1, "Primary surface has %d surfaces attached, expected 1\n", num); @@ -1149,13 +1167,20 @@ static void AttachmentTest7(void) ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FRONTBUFFER; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface1, NULL); ok(hr==DDERR_INVALIDCAPS,"CreateSurface returned: %x\n",hr); +if (FAILED(hr)) { + skip("failed to create surface1\n"); + return; + } memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_BACKBUFFER; hr = IDirectDraw7_CreateSurface(dd7, &ddsd, &surface2, NULL); ok(hr==DDERR_INVALIDCAPS,"CreateSurface returned: %x\n",hr); - +if (FAILED(hr)) { + skip("failed to create surface2\n"); + return; + } /* Try a single primary and two of
Re: Latest Windows Conformance Tests
Chris Ahrendt wrote: > Vitaliy Margolen wrote: >> Chris Ahrendt wrote: >>> Causes windows XP SP3 to reboot during d3d test.. >> >> Would you please stop hijacking threads! Do NOT reply when starting a new >> topic!!! This is highly annoying and it's deemed a really bad habit. >> >> Vitaliy. > I did not hijack a thread I opened a brand new note thank you... > and I was talking about the windows conformance tests which I am running > on my home machine... So before you jump on someone by assuming like you > prefer to do Vitaliy why dont you ask if this is one or not > > > Again havent hijacked a thread.. this is a new thread with a problem I > just got by running on a WINDOWS machine the WINE CONFORMANCE TEST from > http://www.winehq.org/site/docs/winedev-guide/testing-windows > using the precompiled binaries link from that page... > > So if you dont mind I would like an appology for you butting in and > claiming that I am doing something I most certainly am not doing. > > Chris Then get a new e-mail client. Or read the manual for how to use your existing one. From the message you sent: > To: wine-devel > Subject: Latest Windows Conformance Tests > References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL > PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL > PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > In-Reply-To: <[EMAIL PROTECTED]> They match the previous message's: > Message-id: <[EMAIL PROTECTED]> > References: <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> So I'm asking one more time. Please DO NOT reply to the messages when you starting a new topic!!! Make a new message. Vitaliy.
Re: comctl32/tests: Fix tests to not depend on 96 dpi
"Detlef Riekenberg" <[EMAIL PROTECTED]> wrote: > #define DEFAULT_MIN_TAB_WIDTH 54 > -#define TAB_DEFAULT_WIDTH 96 > #define TAB_PADDING_X 6 > #define EXTRA_ICON_PADDING 3 > #define MAX_TABLEN 32 > @@ -507,11 +506,13 @@ static void test_tab(INT nMinTabWidth) > HDC hdc; > HFONT hOldFont; > INT i; > +DWORD dpi; > > hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); > SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); > > hdc = GetDC(hwTab); > +dpi = GetDeviceCaps(hdc, LOGPIXELSY); If you are replacing 'width' shouldn't this be LOGPIXELSX? -- Dmitry.
Re: gdi32/tests: Fix tests to not depend on 96 dpi
"Detlef Riekenberg" <[EMAIL PROTECTED]> wrote: > @@ -101,7 +101,9 @@ static void test_world_transform(void) > > if (is_win9x) > { > -expect_viewport_ext(hdc, 96, 96); > +DWORD dpi; > +dpi = GetDeviceCaps(hdc, LOGPIXELSY); > +expect_viewport_ext(hdc, dpi, dpi); This is still not correct, not all displays have the same resolution in all dimensions. The below one should be slightly better: expect_viewport_ext(hdc, GetDeviceCaps(hdc, LOGPIXELSX), GetDeviceCaps(hdc, LOGPIXELSY)); -- Dmitry.
patchwatcher status
The most pressing issue for patchwatcher is to finish the refactoring into libpatchwatcher.sh and wine-slave.sh. I made a tiny bit of progress there today by applying some typo fixes Rob sent me, and adding the missing timeout enforcement that was already in the monolithic patchwatcher. (Checked in to svn if anyone cares, but not yet useful.) I also added winhttp/tests/__test__ to the blacklist, since it's failed now for three unrelated patches. - Dan
Re: Re[2] [user32: 2/2] Testcase for font size = 0x7fff
On Sun, Oct 12, 2008 at 2:16 PM, Koro <[EMAIL PROTECTED]> wrote: >> Interesting. Would you be willing to contribute your Task Dialogs >> implementation to Wine under the terms of the LGPL? > > I'd have to almost rewrite it completly to fit it into WINE. I don't > feel like it, and neither do I have the time for it. > > Sorry. > > > Then would you be willing to release the source under the LGPL so that someone else may do so? -- -Austin
Re: DIB engine status
On 9/29/08, Sergey Novosyolov <[EMAIL PROTECTED]> wrote: >> The first thing, i like to see is a Design in the correct way: >> Inside gdi32 while using Eng* and friends. >> (Needed by Printer drivers, and any Display driver including mirror / >> remote display drivers) >> > why can't we release DIB-Engine as own driver? GDI32 functions are main and > GDI32 calls driver functions in dependence of which type of DC we have > (printer DC, Xwindow HDC or DIB DC) Any Driver can call the Graphic Rendering Engine (GRE) to do parts (or all) of the rendering (and native driver do that): 1: DDB (Driver managed: using any driver specific format) (The Driver should do Everything. When the driver call the GRE, the DDB is converted to a DIB, GDI renders into the DIB and then the DIB is converted back to a DDB) => like our winex11.drv and wineps.drv 2: DDB (GDI managed: using DIB format) (The driver render, what the driver want to render with hw-support and can call the GRE for all the other rendering without converting) => Needed for native printer drivers / mirror drivers or OpenGL accelerated rendering (stefan did some experiments) 3: DIB (GDI renders everything) => The current Code is using a X11-DDB (Driver Managed) with converting issues. With a winedib.drv (the experimental tree is a wrapper around a wine driver), native printer drivers / mirror drivers will never work without another (additional) wrapper. -- By by ... Detlef
Re: winex11.drv: Improve tracing of wintab WTInfo
On Sun, Oct 12, 2008 at 3:42 PM, John Klehm <[EMAIL PROTECTED]> wrote: > @@ -1079,6 +1079,7 @@ UINT X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput) switch(wCategory) { case 0: +TRACE("category: NULL. Asking for needed buffer size"); /* return largest necessary buffer */ TRACE("%i cursors\n",gNumCursors); if (gNumCursors>0) @@ -1088,29 +1089,35 @@ UINT X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput) } break; case WTI_INTERFACE: +TRACE("category: WTI_INTERFACE\n"); These are extremely superfluous traces. The value of wCategory is traced a few lines up. Why do you need to see anything more than that? Same goes for the rest of the traces you added throughout the patch. -- James Hawkins
Re: Latest Windows Conformance Tests
Vitaliy Margolen wrote: > Chris Ahrendt wrote: >> Causes windows XP SP3 to reboot during d3d test.. > > Would you please stop hijacking threads! Do NOT reply when starting a new > topic!!! This is highly annoying and it's deemed a really bad habit. > > Vitaliy. I did not hijack a thread I opened a brand new note thank you... and I was talking about the windows conformance tests which I am running on my home machine... So before you jump on someone by assuming like you prefer to do Vitaliy why dont you ask if this is one or not Again havent hijacked a thread.. this is a new thread with a problem I just got by running on a WINDOWS machine the WINE CONFORMANCE TEST from http://www.winehq.org/site/docs/winedev-guide/testing-windows using the precompiled binaries link from that page... So if you dont mind I would like an appology for you butting in and claiming that I am doing something I most certainly am not doing. Chris
Re: Latest Windows Conformance Tests
Chris Ahrendt wrote: > Causes windows XP SP3 to reboot during d3d test.. Would you please stop hijacking threads! Do NOT reply when starting a new topic!!! This is highly annoying and it's deemed a really bad habit. Vitaliy.
Re: Latest Windows Conformance Tests
On Sun, Oct 12, 2008 at 2:09 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > James Hawkins wrote: >> >> On Sun, Oct 12, 2008 at 2:02 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: >>> >>> Causes windows XP SP3 to reboot during d3d test.. >>> >>> What and where do I need to send in the information >>> on the issue. >>> >> >> You're going to have to set up a cross-build environment to compile >> the d3d tests and figure out which test exactly is causing your >> machine to reboot. >> > so standard VC++ etc? > That's a possibility. By cross-build, I really meant building the tests in *nix with mingw and then running the tests, usually in a vm, but you should use whichever way is fastest for you. -- James Hawkins
Re[2] [user32: 2/2] Testcase for font size = 0x7fff
> Interesting. Would you be willing to contribute your Task Dialogs > implementation to Wine under the terms of the LGPL? I'd have to almost rewrite it completly to fit it into WINE. I don't feel like it, and neither do I have the time for it. Sorry.
Re: Latest Windows Conformance Tests
James Hawkins wrote: > On Sun, Oct 12, 2008 at 2:02 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: >> Causes windows XP SP3 to reboot during d3d test.. >> >> What and where do I need to send in the information >> on the issue. >> > > You're going to have to set up a cross-build environment to compile > the d3d tests and figure out which test exactly is causing your > machine to reboot. > so standard VC++ etc? Chris
Re: Latest Windows Conformance Tests
On Sun, Oct 12, 2008 at 2:02 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > Causes windows XP SP3 to reboot during d3d test.. > > What and where do I need to send in the information > on the issue. > > Microsoft Windows XP > Home Edition > Version 2002 > Sp 3 > > Pent 4 3.2ghz > 2 gig ram > > Probably bugzilla with your video card driver info too. Cheers, --John Klehm
Re: Latest Windows Conformance Tests
On Sun, Oct 12, 2008 at 2:02 PM, Chris Ahrendt <[EMAIL PROTECTED]> wrote: > Causes windows XP SP3 to reboot during d3d test.. > > What and where do I need to send in the information > on the issue. > You're going to have to set up a cross-build environment to compile the d3d tests and figure out which test exactly is causing your machine to reboot. -- James Hawkins
Latest Windows Conformance Tests
Causes windows XP SP3 to reboot during d3d test.. What and where do I need to send in the information on the issue. Microsoft Windows XP Home Edition Version 2002 Sp 3 Pent 4 3.2ghz 2 gig ram Chris
Re[7] [user32: 2/2] Testcase for font size = 0x7fff
> This is an explanation of the test primitives. Feel free to put it on > the Wine wiki, if you like it. That is an *excellent* explanation. Everything becomes clear now, and indeed this should be documented somewhere (except I can't find how to edit the wiki without making an account). Maybe somebody could wikify it for me? > Use this URL instead: > http://web.archive.org/web/20061224095348/http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx Oh! Thanks a lot! So, on THIS page, it's the fourth comment down, that reads: "The hack in windows is to just set the font height to 0x7fff (don't fill in the other font fields but it still has to be aligned) and it will use the lfMessageFont for you." In the beginning I did read the "don't fill in the other font fields" as "set them to zero" but then I understood later it means "they must not be there."
Re: Added missing values to VGA Mode 19 (256 color) palette registers with comments for related VGA operations. Windows programs that access VGA directly or through BIOS that previously displayed blac
On Sat, Oct 11, 2008 at 4:15 PM, Jeremiah Flerchinger <[EMAIL PROTECTED]> wrote: > > @@ -476,10 +743,12 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg) > return; > } > IDirectDrawSurface_SetPalette(lpddsurf,lpddpal); > + > vga_retrace_vertical = vga_retrace_horizontal = FALSE; > /* poll every 20ms (50fps should provide adequate responsiveness) */ > VGA_InstallTimer(20); > } > + > par->ret=0; > return; > } > There are way too many unnecessary whitespace changes in this patch. Please take them out and resend. -- James Hawkins
Re: wordpad: do not try to close uninitialized handles
On Sun, Oct 12, 2008 at 6:09 AM, Andrey Turkin <[EMAIL PROTECTED]> wrote: > > Fix some functions where CloseHandle was called not matter if previous > open succeeded or not. > HKEY hKey; DWORD size = sizeof(RECT); +BOOL succeeded = FALSE; -if(registry_get_handle(&hKey, 0, key_options) != ERROR_SUCCESS || - RegQueryValueExW(hKey, var_framerect, 0, NULL, (LPBYTE)rc, &size) != - ERROR_SUCCESS || size != sizeof(RECT)) +if(registry_get_handle(&hKey, 0, key_options) == ERROR_SUCCESS) +{ +if (RegQueryValueExW(hKey, var_framerect, 0, NULL, (LPBYTE)rc, &size) == + ERROR_SUCCESS && size == sizeof(RECT)) +{ +succeeded = TRUE; +} + +RegCloseKey(hKey); +} +if (!succeeded) { All of these changes would be a lot cleaner if you just initialize hKey to 0. -- James Hawkins
Re: mshtml: Implement IHTMLStyle get/put posLeft
Alistair Leslie-Hughes wrote: > Hi, > > Changelog: > mshtml: Implement IHTMLStyle get/put posLeft > > Best Regards > Alistair Leslie-Hughes > > {attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT}, > {attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT}, > +{attrLeft, DISPID_IHTMLSTYLE_POSLEFT}, > {attrPosition, DISPID_IHTMLSTYLE2_POSITION}, > {attrTextAlign,DISPID_IHTMLSTYLE_TEXTALIGN}, You can't do this. style_tbl must be sorted because we do binary search on it. Jacek
Re: wordpad: do not pass resource ids to MessageBox
"Andrey Turkin" <[EMAIL PROTECTED]> wrote: >>> It seems that automatic loading of string from resources in MessageBox* >>> is Wine extension. Useful and logical one but still other platform does >>> not support it. >> >> That's not a Wine extension, looks like the author of that code just >> didn't test it. One need to use MessageBoxEx to make it work. >> > > Sorry, I don't really understand what do you mean. For me, both > MessageBox and MessageBoxEx work identically on Windows - the message > box has no caption and no text. Sorry, I should have said MessageBoxIndirect. -- Dmitry.
Re: Proposal: switch Wine source tree to utf-8
On Tue, Sep 2, 2008 at 3:43 AM, Michael Stefaniuc <[EMAIL PROTECTED]> wrote: > Dan Kegel wrote: >> [Let's convert the whole wine source tree to utf-8. Some of it already is, >> but I suspect lots of other files are in obscure character >> sets, which complicates patch processing and display. >> Then there'd be less confusion about >> how to view and edit various resource files.] > > Preferably that should be done by a translator of the language. There might > be some oddities that prevent a full automatic recoding: e.g. Romanian uses > latin-2 and that one has only a "t with cedilla" which exists in utf-8 too > but utf-8 has the more correct "t with comma below accent". >... > We should encourage the translators to move to utf-8. Nogo just converted lots of Japanese resources, which is great. There are probably upwards of 500 files left to convert, though. At some point, after we've been asking translators to move to utf-8 for a while, we should probably do a mop-up pass and do automatic recoding. Translators will then pop out of the woodwork to fix any mistakes that causes :-) - Dan
re: [user32: 2/2] Testcase for font size = 0x7fff
Koro wrote: > I wrote one this summer (http://www.korosoft.net/projects/tdemu/). Interesting. Would you be willing to contribute your Task Dialogs implementation to Wine under the terms of the LGPL? If not, well, thanks for the testcase and bug fix! - Dan
Re: wordpad: do not pass resource ids to MessageBox
Dmitry Timoshkov wrote: > "Andrey Turkin" <[EMAIL PROTECTED]> wrote: > >> It seems that automatic loading of string from resources in MessageBox* >> is Wine extension. Useful and logical one but still other platform does >> not support it. > > That's not a Wine extension, looks like the author of that code just > didn't test it. One need to use MessageBoxEx to make it work. > Sorry, I don't really understand what do you mean. For me, both MessageBox and MessageBoxEx work identically on Windows - the message box has no caption and no text.
Re: wordpad: do not pass resource ids to MessageBox
"Andrey Turkin" <[EMAIL PROTECTED]> wrote: > It seems that automatic loading of string from resources in MessageBox* > is Wine extension. Useful and logical one but still other platform does > not support it. That's not a Wine extension, looks like the author of that code just didn't test it. One need to use MessageBoxEx to make it work. -- Dmitry.
Re: Re[5] [user32: 2/2] Testcase for font size = 0x7fff
Am Sonntag, den 12.10.2008, 01:33 -0400 schrieb Koro: > > ok() is for calls never expected to fail, broken() is for broken API > > implementations and should never be used for Wine. > Noted. More specifically: You *never* use broken on its own. This is an explanation of the test primitives. Feel free to put it on the Wine wiki, if you like it. All tests are spelled out in form of ok(), and you write your ok statement in a way that it expresses what behaviour is OK according to the Win32 API. There might be more than one possibility, like status = WinFrobnicate(foo); ok(status == E_FAIL /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/, "status %08x\n",status); if we think that E_FAIL and E_INVALIDARG are both valid responses. Now, it could be that Wine does not yet handle the WinFrobnicate call yet and returns E_NOT_IMPLEMENTED. As we do not want the test suite on Wine, you might be tempted to write this: status = WinFrobnicate(foo); ok(status == E_FAIL /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/ || status == E_NOT_IMPLEMENTED /* Wine */, "status %08x\n",status); DO NOT DO THAT! This means, that the return code E_NOT_IMPLEMENTED is OK. It definitely is not, but the work on Wine that fixes this problem has still *to be done*, so you should use a todo block: status = WinFrobnicate(foo); todo_wine ok(status == E_FAIL /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/, "status %08x\n",status); A todo block is used like an if statement or a for loop. The todo applies to the next statement or to all statements inside a block following the todo, like here: answer = 0; status = WinFrobnicateWithOutput(foo, &answer); todo_wine { ok(status == E_FAIL /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/, "status %08x\n",status); ok(answer == 42, "Expected the universal answer, got %d\n",answer); } If todo is applied to an OK statement, it must(!) fail for the test to be successfull. As the Wine test suite is meant to not only show what how wine should behave but also document where wine does misbehave, the todo has to be removed as soon as Wine is going to behave correctly. The only common form of the todo block is the todo_wine block that enters the todo mode (inverting tests) if the test is run on Wine and does nothing if the test is run on windows. Next, lets assume that WinFrobnicate is not implemented on Win95/Win98, but implemented on WinNT and up. So in this case, one would write status = WinFrobnicate(foo); ok(status == E_NOT_IMPLEMENTED /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/, "status %08x\n",status); But in this case, we allow both W_NOT_IMPLEMENTED and E_INVALIDARG as valid return values, and even Wine passes the test if it just returns E_INVALIDARG. If Wine should implement this interface, Wine should not get away with E_NOT_IMPLEMENTED. This is where broken() is used. broken() returns the value of its argument if the test runs on Windows, but always false (even if the argument is true) if the test runs on Wine, so the example should be written like this: status = WinFrobnicate(foo); ok(broken(status == E_NOT_IMPLEMENTED) /* Win98*/ || status == E_INVALIDARG /* WinNT,2k,XP*/, "status %08x\n",status); The last testing primitive to introduce is skip. skip is meant to be used if a part of tests could not be executed because the tested system lacks prerequisites, for example a font with a special codepage, a CD drive, a sufficiently recent version of a DLL or because the operations the test wants to perform needs administrative priviledges that the test does not have. It has just statistical value, in incrementing the number of skips. It is used like this: pMagic = CreateMagicInterface("xyzzy"); if(pMagic) { ISpell *spell = IMagic_CreateSpell(pMagic,NULL); /* lots of tests */ IMagic_Release(pMagic); } else skip("CreateMagicInterface returned NULL\n"); Again, this is like the multiple alternatives in the ok() function: Wine gets away without an error being flagged (just a skip, which might be OK in certain tests) if it does not create the magic interface. So like the broken() function inside the ok() function, the Wine testing framework provides a primitive called win_skip() that logs a skip on Windows but an error on Wine. > > What's the source of info you have used for that? > It was on a comment to that post: > http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx > > It seems to have been deleted since then though. The comment said about > the 0x7fff part, but not about the missing members. I found about the > missing members through experimentation after that. Use this URL instead: http://web.archive.org/web/20061224095348/http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx Regards, Michael Karcher
Re: notoskrnl.exe: Fix the stack overflow bugs in raising exceptions(DLL_PROCESS_DETACH processing for DllMain in ntoskrnl.c)
RtlAddVectoredHandler is never fail. vectored_handler_added store adress of handler for DLL_PROCESS_DETACH-case. If vectored_handler_added is null then handler is not been added at DLL_PROCESS_ATTACH-case. If handler not has been removed in DLL_PROCESS_DETACH-case, then called it after FreeLibrary (at raise exception). This raise new exception, raise new exception, ... and stack overflow. Saturday 11 October 2008 16:38:14 Dmitry Timoshkov: > "Anton Rudnev" <[EMAIL PROTECTED]> wrote: > > --- a/dlls/ntoskrnl.exe/ntoskrnl.c > > +++ b/dlls/ntoskrnl.exe/ntoskrnl.c > > @@ -886,14 +886,20 @@ NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( > > PCREATE_PROCESS_NOTIFY_ROUTINE BOOL WINAPI DllMain( HINSTANCE inst, DWORD > > reason, LPVOID reserved ) { > > LARGE_INTEGER count; > > +static vectored_handler_added = NULL; > > > > switch(reason) > > { > > case DLL_PROCESS_ATTACH: > > DisableThreadLibraryCalls( inst ); > > -RtlAddVectoredExceptionHandler( TRUE, vectored_handler ); > > +vectored_handler_added = RtlAddVectoredExceptionHandler( TRUE, > > vectored_handler ); KeQueryTickCount( &count ); /* initialize the global > > KeTickCount */ break; > > +case DLL_PROCESS_DETACH: > > +if(vectored_handler_added){ > > +RtlRemoveVectoredExceptionHandler(vectored_handler_added); > > +vectored_handler_added = NULL; > > +} > > } > > return TRUE; > > } > > What you want is find out why RtlAddVectoredExceptionHandler fails for you, > because it shouldn't fail normally.