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
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
March 2010
----- 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
3 participants
919 discussions
Start a n
N
ew thread
Henri Verbeet : d3d9/tests: Add some message processing to test_wndproc().
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: ab4bf7600ae15186d9f614f71a64456390f6b226 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab4bf7600ae15186d9f614f71…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 25 09:32:39 2010 +0100 d3d9/tests: Add some message processing to test_wndproc(). For some reason Windows XP allows device creation to be blocked by the lack of message processing in wndproc_thread(). Thanks to Wylda for helping debug this. Disabled testing the focus and foreground windows after creating the device for the moment. --- dlls/d3d9/tests/device.c | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index eb424e2..0004715 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -2370,8 +2370,19 @@ static DWORD WINAPI wndproc_thread(void *param) ret = SetEvent(p->window_created); ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); - res = WaitForSingleObject(p->test_finished, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + for (;;) + { + MSG msg; + + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); + res = WaitForSingleObject(p->test_finished, 100); + if (res == WAIT_OBJECT_0) break; + if (res != WAIT_TIMEOUT) + { + ok(0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); + break; + } + } DestroyWindow(p->dummy_window); @@ -2389,6 +2400,7 @@ static void test_wndproc(void) LONG_PTR proc; ULONG ref; DWORD res, tid; + MSG msg; if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) { @@ -2434,6 +2446,8 @@ static void test_wndproc(void) expect_message.window = focus_window; expect_message.message = WM_SETFOCUS; + while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); + device = create_device(d3d9, device_window, focus_window, FALSE); if (!device) { @@ -2443,10 +2457,13 @@ static void test_wndproc(void) ok(!expect_message.message, "Expected message %#x for window %p, but didn't receive it.\n", expect_message.message, expect_message.window); - tmp = GetFocus(); - todo_wine ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); - tmp = GetForegroundWindow(); - todo_wine ok(tmp == focus_window, "Expected foreground window %p, got %p.\n", focus_window, tmp); + if (0) /* Disabled until we can make this work in a reliable way on Wine. */ + { + tmp = GetFocus(); + ok(tmp == focus_window, "Expected focus %p, got %p.\n", focus_window, tmp); + tmp = GetForegroundWindow(); + ok(tmp == focus_window, "Expected foreground window %p, got %p.\n", focus_window, tmp); + } SetForegroundWindow(focus_window); filter_messages = focus_window;
1
0
0
0
Henri Verbeet : wined3d: Just mark the color write mask dirty in IWineD3DDeviceImpl_ClearSurface().
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 9866125e23e76048a2b613dca2002195587b204e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9866125e23e76048a2b613dca…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 25 09:32:38 2010 +0100 wined3d: Just mark the color write mask dirty in IWineD3DDeviceImpl_ClearSurface(). --- dlls/wined3d/device.c | 26 +++++++------------------- 1 files changed, 7 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3acbc30..a6ba6a3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4417,16 +4417,12 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac glMask = glMask | GL_DEPTH_BUFFER_BIT; } - if (Flags & WINED3DCLEAR_TARGET) { - TRACE("Clearing screen with glClear to color %x\n", Color); - glClearColor(D3DCOLOR_R(Color), - D3DCOLOR_G(Color), - D3DCOLOR_B(Color), - D3DCOLOR_A(Color)); - checkGLcall("glClearColor"); - - /* Clear ALL colors! */ + if (Flags & WINED3DCLEAR_TARGET) + { glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE)); + glClearColor(D3DCOLOR_R(Color), D3DCOLOR_G(Color), D3DCOLOR_B(Color), D3DCOLOR_A(Color)); + checkGLcall("glClearColor"); glMask = glMask | GL_COLOR_BUFFER_BIT; } @@ -4486,16 +4482,8 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac } } - if (Flags & WINED3DCLEAR_TARGET) { - DWORD mask = This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE]; - glColorMask(mask & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE, - mask & WINED3DCOLORWRITEENABLE_GREEN ? GL_TRUE : GL_FALSE, - mask & WINED3DCOLORWRITEENABLE_BLUE ? GL_TRUE : GL_FALSE, - mask & WINED3DCOLORWRITEENABLE_ALPHA ? GL_TRUE : GL_FALSE); - - /* Dirtify the target surface for now. If the surface is locked regularly, and an up to date sysmem copy exists, - * it is most likely more efficient to perform a clear on the sysmem copy too instead of downloading it - */ + if (Flags & WINED3DCLEAR_TARGET) + { IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE); } if (Flags & WINED3DCLEAR_ZBUFFER) {
1
0
0
0
Henri Verbeet : wined3d: Use the same order of operations for depth clears as for stencil clears.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 9eb5ba435ed9f57cfe5cecda2d94ea5701134acd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9eb5ba435ed9f57cfe5cecda2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 25 09:32:37 2010 +0100 wined3d: Use the same order of operations for depth clears as for stencil clears. --- dlls/wined3d/device.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index fab9e65..3acbc30 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4404,16 +4404,17 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac glMask = glMask | GL_STENCIL_BUFFER_BIT; } - if (Flags & WINED3DCLEAR_ZBUFFER) { + if (Flags & WINED3DCLEAR_ZBUFFER) + { DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; + if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect)) + surface_load_ds_location(This->stencilBufferTarget, context, location); + glDepthMask(GL_TRUE); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); glClearDepth(Z); checkGLcall("glClearDepth"); glMask = glMask | GL_DEPTH_BUFFER_BIT; - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); - - if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect)) - surface_load_ds_location(This->stencilBufferTarget, context, location); } if (Flags & WINED3DCLEAR_TARGET) {
1
0
0
0
Henri Verbeet : wined3d: Just mark the stencil write mask dirty in IWineD3DDeviceImpl_ClearSurface( ).
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 2e7e118899fc097a40227fd3f50d5269cfc4a08d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e7e118899fc097a40227fd3f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 25 09:32:36 2010 +0100 wined3d: Just mark the stencil write mask dirty in IWineD3DDeviceImpl_ClearSurface(). --- dlls/wined3d/device.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b25c4ec..fab9e65 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4397,10 +4397,11 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE)); } + glStencilMask(~0U); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_STENCILWRITEMASK)); glClearStencil(Stencil); checkGLcall("glClearStencil"); glMask = glMask | GL_STENCIL_BUFFER_BIT; - glStencilMask(0xFFFFFFFF); } if (Flags & WINED3DCLEAR_ZBUFFER) { @@ -4484,10 +4485,6 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac } } - /* Restore the old values (why..?) */ - if (Flags & WINED3DCLEAR_STENCIL) { - glStencilMask(This->stateBlock->renderState[WINED3DRS_STENCILWRITEMASK]); - } if (Flags & WINED3DCLEAR_TARGET) { DWORD mask = This->stateBlock->renderState[WINED3DRS_COLORWRITEENABLE]; glColorMask(mask & WINED3DCOLORWRITEENABLE_RED ? GL_TRUE : GL_FALSE,
1
0
0
0
Henri Verbeet : wined3d: Disable two-sided stencil when doing stencil clears.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 1c4e9e6a0e09fcf6c95013bbb627fb107ffb7072 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c4e9e6a0e09fcf6c95013bbb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 25 09:32:35 2010 +0100 wined3d: Disable two-sided stencil when doing stencil clears. --- dlls/wined3d/device.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d48acf2..b25c4ec 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4390,7 +4390,13 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac ENTER_GL(); /* Only set the values up once, as they are not changing */ - if (Flags & WINED3DCLEAR_STENCIL) { + if (Flags & WINED3DCLEAR_STENCIL) + { + if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE]) + { + glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE)); + } glClearStencil(Stencil); checkGLcall("glClearStencil"); glMask = glMask | GL_STENCIL_BUFFER_BIT;
1
0
0
0
Christian Costa : d3dx9_36: Implement D3DXCreateEffectEx and make D3DXCreateEffect use it.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 39b60870ffc4f35fbbac08a7dd32f208b5b6cd40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39b60870ffc4f35fbbac08a7d…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Thu Mar 25 08:41:18 2010 +0100 d3dx9_36: Implement D3DXCreateEffectEx and make D3DXCreateEffect use it. --- dlls/d3dx9_36/effect.c | 39 ++++++++++++++++++++++++++++----------- include/d3dx9effect.h | 11 +++++++++++ 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index ec775e4..4633d88 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -848,20 +848,21 @@ static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl = ID3DXEffectImpl_SetRawValue }; -HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, - LPCVOID srcdata, - UINT srcdatalen, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXEFFECTPOOL pool, - LPD3DXEFFECT* effect, - LPD3DXBUFFER* compilation_errors) +HRESULT WINAPI D3DXCreateEffectEx(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + LPCSTR skip_constants, + DWORD flags, + LPD3DXEFFECTPOOL pool, + LPD3DXEFFECT* effect, + LPD3DXBUFFER* compilation_errors) { ID3DXEffectImpl* object; - FIXME("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): semi-stub\n", device, srcdata, srcdatalen, defines, include, flags, - pool, effect, compilation_errors); + FIXME("(%p, %p, %u, %p, %p, %p, %#x, %p, %p, %p): semi-stub\n", device, srcdata, srcdatalen, defines, include, + skip_constants, flags, pool, effect, compilation_errors); if (!device || !srcdata) return D3DERR_INVALIDCALL; @@ -888,6 +889,22 @@ HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, return D3D_OK; } +HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + DWORD flags, + LPD3DXEFFECTPOOL pool, + LPD3DXEFFECT* effect, + LPD3DXBUFFER* compilation_errors) +{ + TRACE("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): Forwarded to D3DXCreateEffectEx\n", device, srcdata, srcdatalen, defines, + include, flags, pool, effect, compilation_errors); + + return D3DXCreateEffectEx(device, srcdata, srcdatalen, defines, include, NULL, flags, pool, effect, compilation_errors); +} + HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata, UINT srcdatalen, CONST D3DXMACRO* defines, diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h index 9f06c2a..3bb2878 100644 --- a/include/d3dx9effect.h +++ b/include/d3dx9effect.h @@ -368,6 +368,17 @@ HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, LPD3DXEFFECT* effect, LPD3DXBUFFER* compilation_errors); +HRESULT WINAPI D3DXCreateEffectEx(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + LPCSTR skip_constants, + DWORD flags, + LPD3DXEFFECTPOOL pool, + LPD3DXEFFECT* effect, + LPD3DXBUFFER* compilation_errors); + HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata, UINT srcdatalen, CONST D3DXMACRO* defines,
1
0
0
0
Christian Costa : d3dx9_36: Add stub for D3DXCreateEffectCompiler.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 947fe3a56471ca22969c038a8a3dcc1718145f34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=947fe3a56471ca22969c038a8…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Thu Mar 25 08:41:12 2010 +0100 d3dx9_36: Add stub for D3DXCreateEffectCompiler. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/effect.c | 13 ++++++ include/d3dx9effect.h | 86 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index e4d49e8..3e64218 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -47,7 +47,7 @@ @ stub D3DXCreateCubeTextureFromResourceW @ stub D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) -@ stub D3DXCreateEffectCompiler +@ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) @ stub D3DXCreateEffectCompilerFromFileA @ stub D3DXCreateEffectCompilerFromFileW @ stub D3DXCreateEffectCompilerFromResourceA diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 7a26f64..ec775e4 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -888,6 +888,19 @@ HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, return D3D_OK; } +HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + DWORD flags, + LPD3DXEFFECTCOMPILER* compiler, + LPD3DXBUFFER* parse_errors) +{ + FIXME("(%p, %u, %p, %p, %#x, %p, %p): stub\n", srcdata, srcdatalen, defines, include, flags, compiler, parse_errors); + + return E_NOTIMPL; +} + static const struct ID3DXEffectPoolVtbl ID3DXEffectPool_Vtbl; typedef struct ID3DXEffectPoolImpl { diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h index eb8a9a8..9f06c2a 100644 --- a/include/d3dx9effect.h +++ b/include/d3dx9effect.h @@ -274,6 +274,84 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect) STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT byte_offset, UINT bytes) PURE; }; +typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER; + +DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0); + +#undef INTERFACE +#define INTERFACE ID3DXEffectCompiler + +DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + /*** ID3DXBaseEffect methods ***/ + STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE; + STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE; + STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE; + STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE; + STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE; + STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE; + STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE; + STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index); + STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name); + STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE; + STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE; + STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE; + STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE; + STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE; + STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE; + STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE; + STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE; + STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE; + STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE; + STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE; + STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE; + STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE; + STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE; + STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE; + STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE; + STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE; + STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE; + STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE; + STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE; + STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE; + STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE; + STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE; + STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE; + STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE; + STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE; + STDMETHOD(SetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9 pshader) PURE; + STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE; + STDMETHOD(SetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9 vshader) PURE; + STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE; + STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE; + /*** ID3DXEffectCompiler methods ***/ + STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE; + STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE; + STDMETHOD(CompileEffect)(THIS_ DWORD flags, LPD3DXBUFFER* effect, LPD3DXBUFFER* error_msgs) PURE; + STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, LPCSTR target, DWORD flags, LPD3DXBUFFER* shader, + LPD3DXBUFFER* error_msgs, LPD3DXCONSTANTTABLE* constant_table) PURE; +}; + #ifdef __cplusplus extern "C" { #endif @@ -290,6 +368,14 @@ HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, LPD3DXEFFECT* effect, LPD3DXBUFFER* compilation_errors); +HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata, + UINT srcdatalen, + CONST D3DXMACRO* defines, + LPD3DXINCLUDE include, + DWORD flags, + LPD3DXEFFECTCOMPILER* compiler, + LPD3DXBUFFER* parse_errors); + #ifdef __cplusplus } #endif
1
0
0
0
Christian Costa : d3dx9_36: Remove useless includes.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: 978d51b29c4c9d02c82e0e859d76a4daa49fde97 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=978d51b29c4c9d02c82e0e859…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Thu Mar 25 08:41:06 2010 +0100 d3dx9_36: Remove useless includes. --- dlls/d3dx9_36/effect.c | 2 -- dlls/d3dx9_36/shader.c | 2 -- 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 6c544d2..7a26f64 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -22,8 +22,6 @@ #include "wine/unicode.h" #include "windef.h" #include "wingdi.h" -#include "d3dx9.h" -#include "d3dx9effect.h" #include "d3dx9_36_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dx); diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 9e74a42..1b888a7 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -22,8 +22,6 @@ #include "wine/unicode.h" #include "windef.h" #include "wingdi.h" -#include "d3dx9.h" -#include "d3dx9shader.h" #include "d3dx9_36_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
1
0
0
0
Christian Costa : d3dx9_36: Implement D3DXCreateEffectPool and ID3DXEffectPool interface.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: b5f7ca9ed9020a76b90225de03bf210051b856e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5f7ca9ed9020a76b90225de0…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Thu Mar 25 08:41:00 2010 +0100 d3dx9_36: Implement D3DXCreateEffectPool and ID3DXEffectPool interface. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/effect.c | 81 ++++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/tests/effect.c | 15 ++++++++ include/d3dx9effect.h | 2 + 4 files changed, 99 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index fbcce68..e4d49e8 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -61,7 +61,7 @@ @ stub D3DXCreateEffectFromResourceExA @ stub D3DXCreateEffectFromResourceExW @ stub D3DXCreateEffectFromResourceW -@ stub D3DXCreateEffectPool +@ stdcall D3DXCreateEffectPool(ptr) @ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 5999323..6c544d2 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -889,3 +889,84 @@ HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, return D3D_OK; } + +static const struct ID3DXEffectPoolVtbl ID3DXEffectPool_Vtbl; + +typedef struct ID3DXEffectPoolImpl { + const ID3DXEffectPoolVtbl *lpVtbl; + LONG ref; +} ID3DXEffectPoolImpl; + +/*** IUnknown methods ***/ +static HRESULT WINAPI ID3DXEffectPoolImpl_QueryInterface(ID3DXEffectPool* iface, REFIID riid, void** object) +{ + ID3DXEffectPoolImpl *This = (ID3DXEffectPoolImpl *)iface; + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXEffectPool)) + { + This->lpVtbl->AddRef(iface); + *object = This; + return S_OK; + } + + WARN("Interface %s not found\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXEffectPoolImpl_AddRef(ID3DXEffectPool* iface) +{ + ID3DXEffectPoolImpl *This = (ID3DXEffectPoolImpl *)iface; + + TRACE("(%p)->(): AddRef from %u\n", This, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXEffectPoolImpl_Release(ID3DXEffectPool* iface) +{ + ID3DXEffectPoolImpl *This = (ID3DXEffectPoolImpl *)iface; + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): Release from %u\n", This, ref + 1); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static const struct ID3DXEffectPoolVtbl ID3DXEffectPool_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXEffectPoolImpl_QueryInterface, + ID3DXEffectPoolImpl_AddRef, + ID3DXEffectPoolImpl_Release +}; + +HRESULT WINAPI D3DXCreateEffectPool(LPD3DXEFFECTPOOL* pool) +{ + ID3DXEffectPoolImpl* object; + + TRACE("(%p)\n", pool); + + if (!pool) + return D3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXEffectImpl)); + if (!object) + { + ERR("Out of memory\n"); + return E_OUTOFMEMORY; + } + + object->lpVtbl = &ID3DXEffectPool_Vtbl; + object->ref = 1; + + *pool = (LPD3DXEFFECTPOOL)object; + + return S_OK; +} diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 40a2f18..8b23536 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -47,6 +47,20 @@ static void test_create_effect(IDirect3DDevice9* device) effect->lpVtbl->Release(effect); } +static void test_create_effect_pool(void) +{ + HRESULT hr; + ID3DXEffectPool* pool; + + hr = D3DXCreateEffectPool(NULL); + ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); + + hr = D3DXCreateEffectPool(&pool); + ok(hr == S_OK, "Got result %x, expected 0 (S_OK)\n", hr); + + pool->lpVtbl->Release(pool); +} + START_TEST(effect) { HWND wnd; @@ -79,6 +93,7 @@ START_TEST(effect) } test_create_effect(device); + test_create_effect_pool(); IDirect3DDevice9_Release(device); IDirect3D9_Release(d3d); diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h index b372c25..eb8a9a8 100644 --- a/include/d3dx9effect.h +++ b/include/d3dx9effect.h @@ -278,6 +278,8 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect) extern "C" { #endif +HRESULT WINAPI D3DXCreateEffectPool(LPD3DXEFFECTPOOL* pool); + HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device, LPCVOID srcdata, UINT srcdatalen,
1
0
0
0
Piotr Caban : msvcrt: Added strnlen implementation.
by Alexandre Julliard
25 Mar '10
25 Mar '10
Module: wine Branch: master Commit: c7aba97338445a230a8c3ef5878c132a78490264 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7aba97338445a230a8c3ef58…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Mar 24 22:39:28 2010 +0100 msvcrt: Added strnlen implementation. --- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 13 +++++++++++++ dlls/msvcrt/tests/string.c | 23 +++++++++++++++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index ed283d9..7c1e100 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1389,7 +1389,7 @@ @ cdecl strncmp(str str long) msvcrt.strncmp @ cdecl strncpy(ptr str long) msvcrt.strncpy @ stub strncpy_s -@ stub strnlen +@ cdecl strnlen(str long) msvcrt.strnlen @ cdecl strpbrk(str str) msvcrt.strpbrk @ cdecl strrchr(str long) msvcrt.strrchr @ cdecl strspn(str str) msvcrt.strspn diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index cbfc6e2..f95f92b 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1373,7 +1373,7 @@ @ cdecl strncmp(str str long) msvcrt.strncmp @ cdecl strncpy(ptr str long) msvcrt.strncpy @ stub strncpy_s -@ stub strnlen +@ cdecl strnlen(str long) msvcrt.strnlen @ cdecl strpbrk(str str) msvcrt.strpbrk @ cdecl strrchr(str long) msvcrt.strrchr @ cdecl strspn(str str) msvcrt.strspn diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 058b9ae..988d48e 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1327,7 +1327,7 @@ @ cdecl strncmp(str str long) ntdll.strncmp @ cdecl strncpy(ptr str long) ntdll.strncpy # stub strncpy_s -# stub strnlen +@ cdecl strnlen(str long) MSVCRT_strnlen @ cdecl strpbrk(str str) ntdll.strpbrk @ cdecl strrchr(str long) ntdll.strrchr @ cdecl strspn(str str) ntdll.strspn diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index a5f9a19..2a7c9af 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -314,3 +314,16 @@ MSVCRT_ulong CDECL MSVCRT_strtoul(const char* nptr, char** end, int base) return ret; } + +/****************************************************************** + * strnlen (MSVCRT.@) + */ +MSVCRT_size_t CDECL MSVCRT_strnlen(const char *s, MSVCRT_size_t maxlen) +{ + MSVCRT_size_t i; + + for(i=0; i<maxlen; i++) + if(!s[i]) break; + + return i; +} diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index a7b3404..6fd64d9 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -52,6 +52,7 @@ static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src); static int (__cdecl *p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count); static int (__cdecl *p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc); static int (__cdecl *p_wcsupr_s)(wchar_t *str, size_t size); +static size_t (__cdecl *p_strnlen)(const char *, size_t); static int *p__mb_cur_max; static unsigned char *p_mbctype; @@ -911,6 +912,26 @@ static void test_strtol(void) ok(errno == ERANGE, "wrong errno %d\n", errno); } +static void test_strnlen(void) +{ + static const char str[] = "string"; + size_t res; + + if(!p_strnlen) { + win_skip("strnlen not found\n"); + return; + } + + res = p_strnlen(str, 20); + ok(res == 6, "Returned length = %d\n", (int)res); + + res = p_strnlen(str, 3); + ok(res == 3, "Returned length = %d\n", (int)res); + + res = p_strnlen(NULL, 0); + ok(res == 0, "Returned length = %d\n", (int)res); +} + START_TEST(string) { char mem[100]; @@ -930,6 +951,7 @@ START_TEST(string) p_mbsnbcpy_s = (void *)GetProcAddress( hMsvcrt,"_mbsnbcpy_s" ); p_wcscpy_s = (void *)GetProcAddress( hMsvcrt,"wcscpy_s" ); p_wcsupr_s = (void *)GetProcAddress( hMsvcrt,"_wcsupr_s" ); + p_strnlen = (void *)GetProcAddress( hMsvcrt,"strnlen" ); /* MSVCRT memcpy behaves like memmove for overlapping moves, MFC42 CString::Insert seems to rely on that behaviour */ @@ -959,4 +981,5 @@ START_TEST(string) test_wcscpy_s(); test__wcsupr_s(); test_strtol(); + test_strnlen(); }
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
92
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
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200