winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2007
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
839 discussions
Start a n
N
ew thread
Francois Gouget : comctl32/tests: Add missing '\n's to ok() calls.
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: f9975b004d559117d800e28ba995060b31cc740d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9975b004d559117d800e28ba…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Feb 15 22:37:53 2007 +0100 comctl32/tests: Add missing '\n's to ok() calls. --- dlls/comctl32/tests/trackbar.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tests/trackbar.c b/dlls/comctl32/tests/trackbar.c index cb7e973..337046b 100644 --- a/dlls/comctl32/tests/trackbar.c +++ b/dlls/comctl32/tests/trackbar.c @@ -46,7 +46,7 @@ static void test_trackbar_control(void) hWndTrackbar = create_trackbar(style); - ok(hWndTrackbar != NULL, "Expected non NULL value"); + ok(hWndTrackbar != NULL, "Expected non NULL value\n"); if (hWndTrackbar == NULL){ skip("trackbar control not present?\n"); @@ -58,7 +58,7 @@ static void test_trackbar_control(void) /* test TBM_SETBUDDY */ hWndLeftBuddy = (HWND) CreateWindowEx(0, STATUSCLASSNAME, NULL, 0, 0,0,300,20, NULL, NULL, NULL, NULL); - ok(hWndLeftBuddy != NULL, "Expected non NULL value"); + ok(hWndLeftBuddy != NULL, "Expected non NULL value\n"); if (hWndLeftBuddy != NULL){ hWndCurrentBuddy = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, TRUE, 0); @@ -72,7 +72,7 @@ static void test_trackbar_control(void) hWndRightBuddy = (HWND) CreateWindowEx(0, STATUSCLASSNAME, NULL, 0, 0,0,300,20,NULL,NULL, NULL, NULL); - ok(hWndRightBuddy != NULL, "expected non NULL value"); + ok(hWndRightBuddy != NULL, "expected non NULL value\n"); if (hWndRightBuddy != NULL){ hWndCurrentBuddy = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, TRUE, 0); @@ -335,7 +335,7 @@ static void test_trackbar_control(void) if (hWndTooltip != NULL){ SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 0); rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); - ok(rTest == hWndTooltip, "Expected hWndToolTip, got \n"); + ok(rTest == hWndTooltip, "Expected hWndToolTip, got\n"); SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) NULL, 0); rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); ok(rTest == NULL, "Expected NULL\n"); @@ -364,7 +364,7 @@ static void test_trackbar_control(void) /* test getters and setters without styles set */ hWndTrackbar = create_trackbar(0); - ok(hWndTrackbar != NULL, "Expected non NULL value"); + ok(hWndTrackbar != NULL, "Expected non NULL value\n"); if (hWndTrackbar == NULL){ skip("trackbar control not present?\n");
1
0
0
0
H. Verbeet : wined3d: Remove the d3d9.h include from wined3d_private.h.
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: 78e50b78a6a3ba63ed8fe9951ee6b313340c66ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=78e50b78a6a3ba63ed8fe9951…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 22:37:10 2007 +0100 wined3d: Remove the d3d9.h include from wined3d_private.h. --- dlls/wined3d/wined3d_private.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 403775b..9454a38 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -37,7 +37,6 @@ #include "wine/debug.h" #include "wine/unicode.h" -#include "d3d9.h" #include "wined3d_private_types.h" #include "ddraw.h" #include "wine/wined3d_interface.h"
1
0
0
0
H. Verbeet : wined3d: Get rid of any remaining d3d9 stuff in directx.c.
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: dc5b08cc76638c73e9fe023bb4ece2e5a81b3810 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc5b08cc76638c73e9fe023bb…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 22:37:01 2007 +0100 wined3d: Get rid of any remaining d3d9 stuff in directx.c. --- dlls/wined3d/directx.c | 16 ++++++++-------- include/wine/wined3d_caps.h | 15 +++++++++++++++ include/wine/wined3d_types.h | 2 ++ 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e8043d0..841e16f 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1164,7 +1164,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte if (EnumDisplaySettingsExW(NULL, ModeIdx, &DevModeW, 0)) { pMode->Width = DevModeW.dmPelsWidth; pMode->Height = DevModeW.dmPelsHeight; - pMode->RefreshRate = D3DADAPTER_DEFAULT; + pMode->RefreshRate = WINED3DADAPTER_DEFAULT; if (DevModeW.dmFields & DM_DISPLAYFREQUENCY) pMode->RefreshRate = DevModeW.dmDisplayFrequency; @@ -1195,7 +1195,7 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte if (Mode > 0) return WINED3DERR_INVALIDCALL; pMode->Width = 800; pMode->Height = 600; - pMode->RefreshRate = D3DADAPTER_DEFAULT; + pMode->RefreshRate = WINED3DADAPTER_DEFAULT; pMode->Format = (Format == WINED3DFMT_UNKNOWN) ? WINED3DFMT_X8R8G8B8 : Format; #endif TRACE_(d3d_caps)("W %d H %d rr %d fmt (%x - %s) bpp %u\n", pMode->Width, pMode->Height, @@ -1226,7 +1226,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT A pMode->Width = DevModeW.dmPelsWidth; pMode->Height = DevModeW.dmPelsHeight; bpp = DevModeW.dmBitsPerPel; - pMode->RefreshRate = D3DADAPTER_DEFAULT; + pMode->RefreshRate = WINED3DADAPTER_DEFAULT; if (DevModeW.dmFields&DM_DISPLAYFREQUENCY) { pMode->RefreshRate = DevModeW.dmDisplayFrequency; @@ -1319,7 +1319,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad } /*FIXME: memcpy(&pIdentifier->DeviceIdentifier, ??, sizeof(??GUID)); */ - if (Flags & D3DENUM_NO_WHQL_LEVEL) { + if (Flags & WINED3DENUM_NO_WHQL_LEVEL) { *(pIdentifier->WHQLLevel) = 0; } else { *(pIdentifier->WHQLLevel) = 1; @@ -1859,7 +1859,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, *pCaps->Caps2 = WINED3DCAPS2_CANRENDERWINDOWED | WINED3DCAPS2_FULLSCREENGAMMA; *pCaps->Caps3 = 0; - *pCaps->PresentationIntervals = D3DPRESENT_INTERVAL_IMMEDIATE; + *pCaps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE; *pCaps->CursorCaps = 0; @@ -2135,7 +2135,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, *pCaps->StencilCaps |= WINED3DSTENCILCAPS_TWOSIDED; } - *pCaps->FVFCaps = D3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ + *pCaps->FVFCaps = WINED3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ *pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD | WINED3DTEXOPCAPS_ADDSIGNED | @@ -2266,7 +2266,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, ------------------------------------------------ */ if (This->dxVersion > 8) { /* d3d9.dll sets D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES here because StretchRects is implemented in d3d9 */ - *pCaps->DevCaps2 = D3DDEVCAPS2_STREAMOFFSET; + *pCaps->DevCaps2 = WINED3DDEVCAPS2_STREAMOFFSET; /* TODO: VS3.0 needs at least D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET */ *pCaps->MaxNpatchTessellationLevel = 0; *pCaps->MasterAdapterOrdinal = 0; @@ -2341,7 +2341,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, *pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */ *pCaps->MaxPShaderInstructionsExecuted = 65535; - *pCaps->MaxPixelShader30InstructionSlots = max(D3DMIN30SHADERINSTRUCTIONS, This->gl_info.ps_arb_max_instructions); + *pCaps->MaxPixelShader30InstructionSlots = max(WINED3DMIN30SHADERINSTRUCTIONS, This->gl_info.ps_arb_max_instructions); } else if(*pCaps->PixelShaderVersion == WINED3DPS_VERSION(2,0)) { /* Below we assume PS2.0 specs, not extended 2.0a(GeforceFX)/2.0b(Radeon R3xx) ones */ *pCaps->PS20Caps.Caps = 0; diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 78c2f1a..58cfb57 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -19,6 +19,14 @@ #ifndef __WINE_WINED3D_CAPS_H #define __WINE_WINED3D_CAPS_H +#define WINED3DDEVCAPS2_STREAMOFFSET 0x00000001 +#define WINED3DDEVCAPS2_DMAPNPATCH 0x00000002 +#define WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004 +#define WINED3DDEVCAPS2_ADAPTIVETESSNPATCH 0x00000008 +#define WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x00000010 +#define WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020 +#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040 + #define WINED3DDTCAPS_UBYTE4 0x00000001 #define WINED3DDTCAPS_UBYTE4N 0x00000002 #define WINED3DDTCAPS_SHORT2N 0x00000004 @@ -30,12 +38,19 @@ #define WINED3DDTCAPS_FLOAT16_2 0x00000100 #define WINED3DDTCAPS_FLOAT16_4 0x00000200 +#define WINED3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000FFFF +#define WINED3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000 +#define WINED3DFVFCAPS_PSIZE 0x00100000 + #define WINED3DLINECAPS_TEXTURE 0x00000001 #define WINED3DLINECAPS_ZTEST 0x00000002 #define WINED3DLINECAPS_BLEND 0x00000004 #define WINED3DLINECAPS_ALPHACMP 0x00000008 #define WINED3DLINECAPS_FOG 0x00000010 +#define WINED3DMAX30SHADERINSTRUCTIONS 32768 +#define WINED3DMIN30SHADERINSTRUCTIONS 512 + #define WINED3DPBLENDCAPS_ZERO 0x00000001 #define WINED3DPBLENDCAPS_ONE 0x00000002 #define WINED3DPBLENDCAPS_SRCCOLOR 0x00000004 diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 7723bf6..6f0a28d 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -621,6 +621,8 @@ typedef enum _WINED3DBACKBUFFER_TYPE { WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff } WINED3DBACKBUFFER_TYPE; +#define WINED3DADAPTER_DEFAULT 0 +#define WINED3DENUM_NO_WHQL_LEVEL 2 #define WINED3DPRESENT_BACK_BUFFER_MAX 3 typedef enum _WINED3DSWAPEFFECT {
1
0
0
0
H. Verbeet : wined3d: Add WINED3DCREATE flags and use them.
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: bd5488cda976e56a06b8a74c3f4ec9d50daa0b96 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd5488cda976e56a06b8a74c3…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 22:36:55 2007 +0100 wined3d: Add WINED3DCREATE flags and use them. --- dlls/wined3d/context.c | 2 +- include/wine/wined3d_types.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index cb82405..603ce49 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -596,7 +596,7 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex * *****************************************************************************/ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextUsage usage) { - DWORD tid = This->createParms.BehaviorFlags & D3DCREATE_MULTITHREADED ? GetCurrentThreadId() : 0; + DWORD tid = This->createParms.BehaviorFlags & WINED3DCREATE_MULTITHREADED ? GetCurrentThreadId() : 0; int i; DWORD dirtyState, idx; BYTE shift; diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index dbbd63f..7723bf6 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1565,4 +1565,14 @@ typedef enum _WINED3DSURFTYPE { /* SetPrivateData flags */ #define WINED3DSPD_IUNKNOWN 0x00000001 +/* IWineD3D::CreateDevice behaviour flags */ +#define WINED3DCREATE_FPU_PRESERVE 0x00000002 +#define WINED3DCREATE_MULTITHREADED 0x00000004 +#define WINED3DCREATE_PUREDEVICE 0x00000010 +#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020 +#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040 +#define WINED3DCREATE_MIXED_VERTEXPROCESSING 0x00000080 +#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100 +#define WINED3DCREATE_ADAPTERGROUP_DEVICE 0x00000200 + #endif
1
0
0
0
H. Verbeet : wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS.
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: a4bc52a89c0121be093948e5604b2f07af8c9965 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4bc52a89c0121be093948e56…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Feb 15 22:36:50 2007 +0100 wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS. --- dlls/d3d8/device.c | 96 +++++++++++++++++-------- dlls/d3d8/directx.c | 114 ++++++++++++++++-------------- dlls/d3d9/device.c | 52 +++++++++---- dlls/d3d9/directx.c | 113 +++++++++++++++++------------- dlls/d3d9/swapchain.c | 79 +++++++++++++-------- dlls/ddraw/ddraw.c | 65 +++++------------ dlls/wined3d/device.c | 153 ++++++++++++++++++---------------------- dlls/wined3d/swapchain.c | 16 +---- dlls/wined3d/wined3d_private.h | 2 +- include/wine/wined3d_types.h | 28 ++++---- 10 files changed, 383 insertions(+), 335 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a4bc52a89c0121be09394…
1
0
0
0
Peter Oberndorfer : ntdll: Add a vectored exception handling test to the existing RtlRaiseException test .
by Alexandre Julliard
16 Feb '07
16 Feb '07
Module: wine Branch: master Commit: a30bc5808e253fd6e3405cc85f3dd353b7285463 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a30bc5808e253fd6e3405cc85…
Author: Peter Oberndorfer <kumbayo84(a)arcor.de> Date: Thu Feb 15 19:45:51 2007 +0100 ntdll: Add a vectored exception handling test to the existing RtlRaiseException test. Show that context changes in vectored handler also affect stack handlers. Show that vectored handlers also get the changed context.Eip value. --- dlls/ntdll/tests/exception.c | 59 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 58 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index e892bc6..557f779 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -40,6 +40,8 @@ static struct _TEB * (WINAPI *pNtCurrentTeb)(void); static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*); static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*); static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec); +static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG first, PVECTORED_EXCEPTION_HANDLER func); +static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID handler); static void *code_mem; /* Test various instruction combinations that cause a protection fault on the i386, @@ -164,6 +166,7 @@ static const struct exception }; static int got_exception; +static BOOL have_vectored_api; static void run_exception_test(const void *handler, const void* context, const void *code, unsigned int code_size) @@ -185,6 +188,39 @@ static void run_exception_test(const void *handler, const void* context, pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev; } +LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo) +{ + PCONTEXT context = ExceptionInfo->ContextRecord; + PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord; + trace("vect. handler %08x addr:%p context.Eip:%x\n", rec->ExceptionCode, + rec->ExceptionAddress, context->Eip); + + todo_wine { + ok(rec->ExceptionAddress == (char *)code_mem + 0xb, "ExceptionAddress at %p instead of %p\n", + rec->ExceptionAddress, (char *)code_mem + 0xb); + } + + /* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT + * even if raised by RtlRaiseException + */ + if(rec->ExceptionCode == EXCEPTION_BREAKPOINT) + { + todo_wine { + ok(context->Eip == (DWORD)code_mem + 0xa, "Eip at %x instead of %x\n", + context->Eip, (DWORD)code_mem + 0xa); + } + } + else + { + ok(context->Eip == (DWORD)code_mem + 0xb, "Eip at %x instead of %x\n", + context->Eip, (DWORD)code_mem + 0xb); + } + + /* test if context change is preserved from vectored handler to stack handlers */ + context->Eax = 0xf00f00f0; + return EXCEPTION_CONTINUE_SEARCH; +} + static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) { @@ -212,6 +248,10 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR context->Eip, (DWORD)code_mem + 0xb); } + if(have_vectored_api) + ok(context->Eax == 0xf00f00f0, "Eax is %x, should have been set to 0xf00f00f0 in vectored handler\n", + context->Eax); + /* Eip in context is decreased by 1 * Increase it again, else execution will continue in the middle of a instruction */ if(rec->ExceptionCode == EXCEPTION_BREAKPOINT && (context->Eip == (DWORD)code_mem + 0xa)) @@ -235,9 +275,9 @@ static const BYTE call_one_arg_code[] = { static void run_rtlraiseexception_test(DWORD exceptioncode) { - EXCEPTION_REGISTRATION_RECORD frame; EXCEPTION_RECORD record; + PVOID vectored_handler = NULL; void (*func)(void* function, EXCEPTION_RECORD* record) = code_mem; @@ -253,7 +293,16 @@ static void run_rtlraiseexception_test(DWORD exceptioncode) memcpy(code_mem, call_one_arg_code, sizeof(call_one_arg_code)); pNtCurrentTeb()->Tib.ExceptionList = &frame; + if (have_vectored_api) + { + vectored_handler = pRtlAddVectoredExceptionHandler(TRUE, &rtlraiseexception_vectored_handler); + ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); + } + func(pRtlRaiseException, &record); + + if (have_vectored_api) + pRtlRemoveVectoredExceptionHandler(vectored_handler); pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; } @@ -466,12 +515,20 @@ static void test_exceptions(void) pNtGetContextThread = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtGetContextThread" ); pNtSetContextThread = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "NtSetContextThread" ); pRtlRaiseException = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "RtlRaiseException" ); + pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), + "RtlAddVectoredExceptionHandler" ); + pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), + "RtlRemoveVectoredExceptionHandler" ); if (!pNtGetContextThread || !pNtSetContextThread) { trace( "NtGetContextThread/NtSetContextThread not found, skipping tests\n" ); return; } + if (pRtlAddVectoredExceptionHandler && pRtlRemoveVectoredExceptionHandler) + have_vectored_api = TRUE; + else + skip("RtlAddVectoredExceptionHandler or RtlRemoveVectoredExceptionHandler not found\n"); /* test handling of debug registers */ run_exception_test(dreg_handler, NULL, &segfault_code, sizeof(segfault_code));
1
0
0
0
Alexandre Julliard : gdi32/tests: Create a window for justification tests that generate output
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 6ede7a1130db8d7b964b506005a1f9bc1679f3ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ede7a1130db8d7b964b50600…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 15 19:41:34 2007 +0100 gdi32/tests: Create a window for justification tests that generate output instead of painting over the desktop. --- dlls/gdi32/tests/font.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index ada2c7f..f491459 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -998,10 +998,11 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea) static void test_SetTextJustification(void) { - HDC hdc = GetDC(0); - RECT clientArea = {0, 0, 400, 400}; + HDC hdc; + RECT clientArea; LOGFONTA lf; HFONT hfont; + HWND hwnd; static char testText[] = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut " @@ -1011,6 +1012,10 @@ static void test_SetTextJustification(void) "nulla pariatur. Excepteur sint occaecat cupidatat non proident, " "sunt in culpa qui officia deserunt mollit anim id est laborum."; + hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0, 400,400, 0, 0, 0, NULL); + GetClientRect( hwnd, &clientArea ); + hdc = GetDC( hwnd ); + memset(&lf, 0, sizeof lf); lf.lfCharSet = ANSI_CHARSET; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; @@ -1024,7 +1029,8 @@ static void test_SetTextJustification(void) testJustification(hdc, testText, &clientArea); DeleteObject(hfont); - ReleaseDC(0, hdc); + ReleaseDC(hwnd, hdc); + DestroyWindow(hwnd); } static void test_font_charset(void)
1
0
0
0
Rob Shearman : advapi32: Add tests for token impersonation levels and what operations are allowed at each level .
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 795b40187e269f9858861be229da3af02e3dc799 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=795b40187e269f9858861be22…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Feb 15 16:25:58 2007 +0000 advapi32: Add tests for token impersonation levels and what operations are allowed at each level. --- dlls/advapi32/tests/security.c | 104 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 58516d7..11863ed 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1556,6 +1556,109 @@ static void test_process_security_child(void) CloseHandle( handle ); } +static void test_impersonation_level(void) +{ + HANDLE Token, ProcessToken; + HANDLE Token2; + DWORD Size; + TOKEN_PRIVILEGES *Privileges; + TOKEN_USER *User; + PRIVILEGE_SET *PrivilegeSet; + BOOL AccessGranted; + BOOL ret; + HKEY hkey; + DWORD error; + + ret = ImpersonateSelf(SecurityAnonymous); + ok(ret, "ImpersonateSelf(SecurityAnonymous) failed with error %d\n", GetLastError()); + ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); + todo_wine { + ok(!ret, "OpenThreadToken should have failed\n"); + error = GetLastError(); + ok(error == ERROR_CANT_OPEN_ANONYMOUS, "OpenThreadToken on anonymous token should have returned ERROR_CANT_OPEN_ANONYMOUS instead of %d\n", error); + /* can't perform access check when opening object against an anonymous impersonation token */ + error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); + ok(error == ERROR_INVALID_HANDLE, "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE instead of %d\n", error); + } + RevertToSelf(); + + ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &ProcessToken); + ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); + + ret = DuplicateTokenEx(ProcessToken, + TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE, NULL, + SecurityAnonymous, TokenImpersonation, &Token); + ok(ret, "DuplicateTokenEx failed with error %d\n", GetLastError()); + /* can't increase the impersonation level */ + ret = DuplicateToken(Token, SecurityIdentification, &Token2); + error = GetLastError(); + todo_wine { + ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, + "Duplicating a token and increasing the impersonation level should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); + } + /* we can query anything from an anonymous token, including the user */ + ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); + error = GetLastError(); + ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenUser) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); + User = (TOKEN_USER *)HeapAlloc(GetProcessHeap(), 0, Size); + ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); + ok(ret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, User); + + /* PrivilegeCheck fails with SecurityAnonymous level */ + ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); + error = GetLastError(); + ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); + Privileges = (TOKEN_PRIVILEGES *)HeapAlloc(GetProcessHeap(), 0, Size); + ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); + ok(ret, "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); + + PrivilegeSet = (PRIVILEGE_SET *)HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(PRIVILEGE_SET, Privilege[Privileges->PrivilegeCount])); + PrivilegeSet->PrivilegeCount = Privileges->PrivilegeCount; + memcpy(PrivilegeSet->Privilege, Privileges->Privileges, PrivilegeSet->PrivilegeCount * sizeof(PrivilegeSet->Privilege[0])); + PrivilegeSet->Control = PRIVILEGE_SET_ALL_NECESSARY; + HeapFree(GetProcessHeap(), 0, Privileges); + + ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); + error = GetLastError(); + todo_wine { + ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, "PrivilegeCheck for SecurityAnonymous token should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); + } + + CloseHandle(Token); + + ret = ImpersonateSelf(SecurityIdentification); + ok(ret, "ImpersonateSelf(SecurityIdentification) failed with error %d\n", GetLastError()); + ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); + ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + + /* can't perform access check when opening object against an identification impersonation token */ + error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); + todo_wine { + ok(error == ERROR_INVALID_HANDLE, "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE instead of %d\n", error); + } + ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); + ok(ret, "PrivilegeCheck for SecurityIdentification failed with error %d\n", GetLastError()); + CloseHandle(Token); + RevertToSelf(); + + ret = ImpersonateSelf(SecurityImpersonation); + ok(ret, "ImpersonateSelf(SecurityImpersonation) failed with error %d\n", GetLastError()); + ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); + ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); + ok(error == ERROR_SUCCESS, "RegOpenKeyEx should have succeeded instead of failing with %d\n", error); + RegCloseKey(hkey); + ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); + ok(ret, "PrivilegeCheck for SecurityImpersonation failed with error %d\n", GetLastError()); + RevertToSelf(); + + CloseHandle(Token); + CloseHandle(ProcessToken); + + HeapFree(GetProcessHeap(), 0, PrivilegeSet); +} + START_TEST(security) { init(); @@ -1575,4 +1678,5 @@ START_TEST(security) test_LookupAccountSid(); test_LookupAccountName(); test_process_security(); + test_impersonation_level(); }
1
0
0
0
Rob Shearman : advapi32: Add some more tests for AccessCheck that determine what
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 4ea75354974a5dae934a9d45ef9b639b46aa4e20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ea75354974a5dae934a9d45e…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Feb 15 16:25:20 2007 +0000 advapi32: Add some more tests for AccessCheck that determine what token impersonation levels it accepts and to show that it doesn't accept primary tokens. --- dlls/advapi32/tests/security.c | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 89989f2..58516d7 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -659,6 +659,7 @@ static void test_AccessCheck(void) ACCESS_MASK Access; BOOL AccessStatus; HANDLE Token; + HANDLE ProcessToken; BOOL ret; DWORD PrivSetLen; PRIVILEGE_SET *PrivSet; @@ -716,13 +717,13 @@ static void test_AccessCheck(void) PrivSet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, PrivSetLen); PrivSet->PrivilegeCount = 16; - ImpersonateSelf(SecurityImpersonation); + res = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &ProcessToken); + ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, FALSE, TRUE, &Enabled); - ret = OpenThreadToken(GetCurrentThread(), - TOKEN_QUERY, TRUE, &Token); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); + res = DuplicateToken(ProcessToken, SecurityIdentification, &Token); + ok(res, "DuplicateToken failed with error %d\n", GetLastError()); /* SD without owner/group */ SetLastError(0xdeadbeef); @@ -802,7 +803,30 @@ static void test_AccessCheck(void) trace("Couldn't get SE_SECURITY_PRIVILEGE (0x%08x), skipping ACCESS_SYSTEM_SECURITY test\n", ret); - RevertToSelf(); + CloseHandle(Token); + + res = DuplicateToken(ProcessToken, SecurityAnonymous, &Token); + ok(res, "DuplicateToken failed with error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, + PrivSet, &PrivSetLen, &Access, &AccessStatus); + err = GetLastError(); + todo_wine { + ok(!ret && err == ERROR_BAD_IMPERSONATION_LEVEL, "AccessCheck should have failed " + "with ERROR_BAD_IMPERSONATION_LEVEL, instead of %d\n", err); + } + + CloseHandle(Token); + + SetLastError(0xdeadbeef); + ret = AccessCheck(SecurityDescriptor, ProcessToken, KEY_READ, &Mapping, + PrivSet, &PrivSetLen, &Access, &AccessStatus); + err = GetLastError(); + ok(!ret && err == ERROR_NO_IMPERSONATION_TOKEN, "AccessCheck should have failed " + "with ERROR_NO_IMPERSONATION_TOKEN, instead of %d\n", err); + + CloseHandle(ProcessToken); if (EveryoneSid) FreeSid(EveryoneSid);
1
0
0
0
Rob Shearman : dbghelp: nread can be NULL for read_mem and read_mem64.
by Alexandre Julliard
15 Feb '07
15 Feb '07
Module: wine Branch: master Commit: 3f8215d214c1f5345e3d1c83a1a7ef0bbda454e2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f8215d214c1f5345e3d1c83a…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Feb 15 16:24:39 2007 +0000 dbghelp: nread can be NULL for read_mem and read_mem64. --- dlls/dbghelp/stack.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c index aec6a2b..10b5612 100644 --- a/dlls/dbghelp/stack.c +++ b/dlls/dbghelp/stack.c @@ -62,7 +62,7 @@ static BOOL CALLBACK read_mem(HANDLE hProcess, DWORD addr, void* buffer, { SIZE_T r; if (!ReadProcessMemory(hProcess, (void*)addr, buffer, size, &r)) return FALSE; - *nread = r; + if (nread) *nread = r; return TRUE; } @@ -71,7 +71,7 @@ static BOOL CALLBACK read_mem64(HANDLE hProcess, DWORD64 addr, void* buffer, { SIZE_T r; if (!ReadProcessMemory(hProcess, (void*)(DWORD_PTR)addr, buffer, size, &r)) return FALSE; - *nread = r; + if (nread) *nread = r; return TRUE; }
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
84
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200