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
March 2011
----- 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
2 participants
849 discussions
Start a n
N
ew thread
Francois Gouget : wineps.drv: PSDRV_YWStoDS() is unused so remove it.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 0377d0a2e65ee3c6b11e24032fd9bfcdfbaf6061 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0377d0a2e65ee3c6b11e24032…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 30 16:42:29 2011 +0200 wineps.drv: PSDRV_YWStoDS() is unused so remove it. --- dlls/wineps.drv/graphics.c | 17 ----------------- dlls/wineps.drv/psdrv.h | 1 - 2 files changed, 0 insertions(+), 18 deletions(-) diff --git a/dlls/wineps.drv/graphics.c b/dlls/wineps.drv/graphics.c index 16a4482..95e9653 100644 --- a/dlls/wineps.drv/graphics.c +++ b/dlls/wineps.drv/graphics.c @@ -52,23 +52,6 @@ INT PSDRV_XWStoDS( PSDRV_PDEVICE *physDev, INT width ) } /*********************************************************************** - * PSDRV_YWStoDS - * - * Performs a world-to-viewport transformation on the specified height. - */ -INT PSDRV_YWStoDS( PSDRV_PDEVICE *physDev, INT height ) -{ - POINT pt[2]; - - pt[0].x = 0; - pt[0].y = 0; - pt[1].x = 0; - pt[1].y = height; - LPtoDP( physDev->hdc, pt, 2 ); - return pt[1].y - pt[0].y; -} - -/*********************************************************************** * PSDRV_DrawLine */ static void PSDRV_DrawLine( PSDRV_PDEVICE *physDev ) diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index c6c7571..0d17bf6 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -419,7 +419,6 @@ extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm, extern void PSDRV_FreeAFMList( FONTFAMILY *head ); extern INT PSDRV_XWStoDS( PSDRV_PDEVICE *physDev, INT width ); -extern INT PSDRV_YWStoDS( PSDRV_PDEVICE *physDev, INT height ); extern BOOL PSDRV_Brush(PSDRV_PDEVICE *physDev, BOOL EO); extern BOOL PSDRV_SetFont( PSDRV_PDEVICE *physDev );
1
0
0
0
Francois Gouget : msxml3: Make xslpattern_error() static.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 95b6e6b3cd49fbb8d5414ff55868e6bc41c9204a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95b6e6b3cd49fbb8d5414ff55…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 30 16:43:13 2011 +0200 msxml3: Make xslpattern_error() static. --- dlls/msxml3/xslpattern.h | 2 +- dlls/msxml3/xslpattern.y | 35 +++++++++++++++++------------------ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/dlls/msxml3/xslpattern.h b/dlls/msxml3/xslpattern.h index ead3b3f..99bf8ca 100644 --- a/dlls/msxml3/xslpattern.h +++ b/dlls/msxml3/xslpattern.h @@ -51,6 +51,6 @@ int xslpattern_lex_init(void**); int xslpattern_lex_destroy(void*); void xslpattern_set_extra(parser_param*, void*); int xslpattern_parse(parser_param*, void*); -void xslpattern_error(parser_param* param, void const* scanner, char const* msg); + #endif /* __XSLPATTERN__ */ diff --git a/dlls/msxml3/xslpattern.y b/dlls/msxml3/xslpattern.y index 68c4c3c..5187761 100644 --- a/dlls/msxml3/xslpattern.y +++ b/dlls/msxml3/xslpattern.y @@ -42,6 +42,23 @@ static inline BOOL is_literal(xmlChar const* tok) (tok[0] == '\'' || tok[0] == '"')); } +static void xslpattern_error(parser_param* param, void const* scanner, char const* msg) +{ + FIXME("%s:\n" + " param {\n" + " yyscanner=%p\n" + " ctx=%p\n" + " in=\"%s\"\n" + " pos=%i\n" + " len=%i\n" + " out=\"%s\"\n" + " err=%i\n" + " }\n" + " scanner=%p\n", + msg, param->yyscanner, param->ctx, param->in, param->pos, + param->len, param->out, ++param->err, scanner); +} + %} %token TOK_Parent TOK_Self TOK_DblFSlash TOK_FSlash TOK_Axis TOK_Colon @@ -728,22 +745,4 @@ static inline BOOL is_literal(xmlChar const* tok) %% -void xslpattern_error(parser_param* param, void const* scanner, char const* msg) -{ - FIXME("%s:\n" - " param {\n" - " yyscanner=%p\n" - " ctx=%p\n" - " in=\"%s\"\n" - " pos=%i\n" - " len=%i\n" - " out=\"%s\"\n" - " err=%i\n" - " }\n" - " scanner=%p\n", - msg, param->yyscanner, param->ctx, param->in, param->pos, - param->len, param->out, ++param->err, scanner); -} - - #endif /* HAVE_LIBXML2 */
1
0
0
0
Francois Gouget : openal32: Make a bunch of wrapper functions static.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 09ba4265017814586f6a3081a7e604dfee6c1e8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09ba4265017814586f6a3081a…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 30 16:41:12 2011 +0200 openal32: Make a bunch of wrapper functions static. --- dlls/openal32/openal.c | 72 ++++++++++++++++++++++++------------------------ 1 files changed, 36 insertions(+), 36 deletions(-) diff --git a/dlls/openal32/openal.c b/dlls/openal32/openal.c index 784fbb5..b2bb2da 100644 --- a/dlls/openal32/openal.c +++ b/dlls/openal32/openal.c @@ -545,7 +545,7 @@ ALvoid CDECL wine_alBufferData(ALuint bid, ALenum format, const ALvoid* data, AL alBufferData(bid, format, data, size, freq); } -ALvoid CDECL wine_alBufferDataStatic(const ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq) +static ALvoid CDECL wine_alBufferDataStatic(const ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq) { alBufferDataStatic(bid, format, data, size, freq); } @@ -689,176 +689,176 @@ ALvoid CDECL wine_alSpeedOfSound(ALfloat value) } /* OpenAL EFX extension functions */ -ALvoid CDECL wine_alGenFilters(ALsizei n, ALuint* filters) +static ALvoid CDECL wine_alGenFilters(ALsizei n, ALuint* filters) { alGenFilters(n, filters); } -ALvoid CDECL wine_alDeleteFilters(ALsizei n, const ALuint* filters) +static ALvoid CDECL wine_alDeleteFilters(ALsizei n, const ALuint* filters) { alDeleteFilters(n, filters); } -ALboolean CDECL wine_alIsFilter(ALuint fid) +static ALboolean CDECL wine_alIsFilter(ALuint fid) { return alIsFilter(fid); } -ALvoid CDECL wine_alFilterf(ALuint fid, ALenum param, ALfloat value) +static ALvoid CDECL wine_alFilterf(ALuint fid, ALenum param, ALfloat value) { alFilterf(fid, param, value); } -ALvoid CDECL wine_alFilterfv(ALuint fid, ALenum param, const ALfloat* values) +static ALvoid CDECL wine_alFilterfv(ALuint fid, ALenum param, const ALfloat* values) { alFilterfv(fid, param, values); } -ALvoid CDECL wine_alFilteri(ALuint fid, ALenum param, ALint value) +static ALvoid CDECL wine_alFilteri(ALuint fid, ALenum param, ALint value) { alFilteri(fid, param, value); } -ALvoid CDECL wine_alFilteriv(ALuint fid, ALenum param, const ALint* values) +static ALvoid CDECL wine_alFilteriv(ALuint fid, ALenum param, const ALint* values) { alFilteriv(fid, param, values); } -ALvoid CDECL wine_alGetFilterf(ALuint fid, ALenum param, ALfloat* value) +static ALvoid CDECL wine_alGetFilterf(ALuint fid, ALenum param, ALfloat* value) { alGetFilterf(fid, param, value); } -ALvoid CDECL wine_alGetFilterfv(ALuint fid, ALenum param, ALfloat* values) +static ALvoid CDECL wine_alGetFilterfv(ALuint fid, ALenum param, ALfloat* values) { alGetFilterfv(fid, param, values); } -ALvoid CDECL wine_alGetFilteri(ALuint fid, ALenum param, ALint* value) +static ALvoid CDECL wine_alGetFilteri(ALuint fid, ALenum param, ALint* value) { alGetFilteri(fid, param, value); } -ALvoid CDECL wine_alGetFilteriv(ALuint fid, ALenum param, ALint* values) +static ALvoid CDECL wine_alGetFilteriv(ALuint fid, ALenum param, ALint* values) { alGetFilteriv(fid, param, values); } -ALvoid CDECL wine_alGenEffects(ALsizei n, ALuint* effects) +static ALvoid CDECL wine_alGenEffects(ALsizei n, ALuint* effects) { alGenEffects(n, effects); } -ALvoid CDECL wine_alDeleteEffects(ALsizei n, const ALuint* effects) +static ALvoid CDECL wine_alDeleteEffects(ALsizei n, const ALuint* effects) { alDeleteEffects(n, effects); } -ALboolean CDECL wine_alIsEffect(ALuint eid) +static ALboolean CDECL wine_alIsEffect(ALuint eid) { return alIsEffect(eid); } -ALvoid CDECL wine_alEffectf(ALuint eid, ALenum param, ALfloat value) +static ALvoid CDECL wine_alEffectf(ALuint eid, ALenum param, ALfloat value) { alEffectf(eid, param, value); } -ALvoid CDECL wine_alEffectfv(ALuint eid, ALenum param, const ALfloat* values) +static ALvoid CDECL wine_alEffectfv(ALuint eid, ALenum param, const ALfloat* values) { alEffectfv(eid, param, values); } -ALvoid CDECL wine_alEffecti(ALuint eid, ALenum param, ALint value) +static ALvoid CDECL wine_alEffecti(ALuint eid, ALenum param, ALint value) { alEffecti(eid, param, value); } -ALvoid CDECL wine_alEffectiv(ALuint eid, ALenum param, const ALint* values) +static ALvoid CDECL wine_alEffectiv(ALuint eid, ALenum param, const ALint* values) { alEffectiv(eid, param, values); } -ALvoid CDECL wine_alGetEffectf(ALuint eid, ALenum param, ALfloat* value) +static ALvoid CDECL wine_alGetEffectf(ALuint eid, ALenum param, ALfloat* value) { alGetEffectf(eid, param, value); } -ALvoid CDECL wine_alGetEffectfv(ALuint eid, ALenum param, ALfloat* values) +static ALvoid CDECL wine_alGetEffectfv(ALuint eid, ALenum param, ALfloat* values) { alGetEffectfv(eid, param, values); } -ALvoid CDECL wine_alGetEffecti(ALuint eid, ALenum param, ALint* value) +static ALvoid CDECL wine_alGetEffecti(ALuint eid, ALenum param, ALint* value) { alGetEffecti(eid, param, value); } -ALvoid CDECL wine_alGetEffectiv(ALuint eid, ALenum param, ALint* values) +static ALvoid CDECL wine_alGetEffectiv(ALuint eid, ALenum param, ALint* values) { alGetEffectiv(eid, param, values); } -ALvoid CDECL wine_alGenAuxiliaryEffectSlots(ALsizei n, ALuint* slots) +static ALvoid CDECL wine_alGenAuxiliaryEffectSlots(ALsizei n, ALuint* slots) { alGenAuxiliaryEffectSlots(n, slots); } -ALvoid CDECL wine_alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint* slots) +static ALvoid CDECL wine_alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint* slots) { alDeleteAuxiliaryEffectSlots(n, slots); } -ALboolean CDECL wine_alIsAuxiliaryEffectSlot(ALuint sid) +static ALboolean CDECL wine_alIsAuxiliaryEffectSlot(ALuint sid) { return alIsAuxiliaryEffectSlot(sid); } -ALvoid CDECL wine_alAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat value) +static ALvoid CDECL wine_alAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat value) { alAuxiliaryEffectSlotf(sid, param, value); } -ALvoid CDECL wine_alAuxiliaryEffectSlotfv(ALuint sid, ALenum param, const ALfloat* values) +static ALvoid CDECL wine_alAuxiliaryEffectSlotfv(ALuint sid, ALenum param, const ALfloat* values) { alAuxiliaryEffectSlotfv(sid, param, values); } -ALvoid CDECL wine_alAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint value) +static ALvoid CDECL wine_alAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint value) { alAuxiliaryEffectSloti(sid, param, value); } -ALvoid CDECL wine_alAuxiliaryEffectSlotiv(ALuint sid, ALenum param, const ALint* values) +static ALvoid CDECL wine_alAuxiliaryEffectSlotiv(ALuint sid, ALenum param, const ALint* values) { alAuxiliaryEffectSlotiv(sid, param, values); } -ALvoid CDECL wine_alGetAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat* value) +static ALvoid CDECL wine_alGetAuxiliaryEffectSlotf(ALuint sid, ALenum param, ALfloat* value) { alGetAuxiliaryEffectSlotf(sid, param, value); } -ALvoid CDECL wine_alGetAuxiliaryEffectSlotfv(ALuint sid, ALenum param, ALfloat* values) +static ALvoid CDECL wine_alGetAuxiliaryEffectSlotfv(ALuint sid, ALenum param, ALfloat* values) { alGetAuxiliaryEffectSlotfv(sid, param, values); } -ALvoid CDECL wine_alGetAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint* value) +static ALvoid CDECL wine_alGetAuxiliaryEffectSloti(ALuint sid, ALenum param, ALint* value) { alGetAuxiliaryEffectSloti(sid, param, value); } -ALvoid CDECL wine_alGetAuxiliaryEffectSlotiv(ALuint sid, ALenum param, ALint* values) +static ALvoid CDECL wine_alGetAuxiliaryEffectSlotiv(ALuint sid, ALenum param, ALint* values) { alGetAuxiliaryEffectSlotiv(sid, param, values); } /* Thread-local context functions */ -ALCboolean CDECL wine_alcSetThreadContext(ALCcontext *context) +static ALCboolean CDECL wine_alcSetThreadContext(ALCcontext *context) { EnterCriticalSection(&openal_cs); if(alcSetThreadContext(context) == ALC_FALSE) @@ -878,7 +878,7 @@ ALCboolean CDECL wine_alcSetThreadContext(ALCcontext *context) return ALC_TRUE; } -ALCcontext* CDECL wine_alcGetThreadContext(ALCvoid) +static ALCcontext* CDECL wine_alcGetThreadContext(ALCvoid) { return alcGetThreadContext(); }
1
0
0
0
Francois Gouget : msxml3/tests: Add a '\n' to an ok() call.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 7c676fbfd4759169eedb8200094b5f6ddeeb8565 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c676fbfd4759169eedb82000…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 30 16:40:31 2011 +0200 msxml3/tests: Add a '\n' to an ok() call. --- dlls/msxml3/tests/domdoc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 29c20bf..650f3d5 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -7287,7 +7287,7 @@ static void test_nodeTypedValue(void) if (entry->type == (VT_ARRAY|VT_UI1)) { ok(!memcmp( V_BSTR(&value), entry->value, strlen(entry->value)), - "expected %s", entry->value); + "expected %s\n", entry->value); } else ok(lstrcmpW( V_BSTR(&value), _bstr_(entry->value)) == 0,
1
0
0
0
Francois Gouget : mscoree/tests: Make init_pointers() static.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 2bce4273922072d83e6e188bef67051be4ed6fe2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2bce4273922072d83e6e188be…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 30 16:40:23 2011 +0200 mscoree/tests: Make init_pointers() static. --- dlls/mscoree/tests/metahost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mscoree/tests/metahost.c b/dlls/mscoree/tests/metahost.c index 665ee65..50821be 100644 --- a/dlls/mscoree/tests/metahost.c +++ b/dlls/mscoree/tests/metahost.c @@ -34,7 +34,7 @@ static HRESULT (WINAPI *pCLRCreateInstance)(REFCLSID clsid, REFIID riid, LPVOID static ICLRMetaHost *metahost; -BOOL init_pointers(void) +static BOOL init_pointers(void) { HRESULT hr = E_FAIL;
1
0
0
0
Damjan Jovanovic : winemenubuilder: Do not skip entries when cleaning up file open associations.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 299d84bf2ca59d34a242bada5b61f86e3cc991b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=299d84bf2ca59d34a242bada5…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Wed Mar 30 16:22:23 2011 +0200 winemenubuilder: Do not skip entries when cleaning up file open associations. --- programs/winemenubuilder/winemenubuilder.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 8b230b1..5908e4e 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2106,7 +2106,7 @@ static BOOL cleanup_associations(void) { int i; BOOL done = FALSE; - for (i = 0; !done; i++) + for (i = 0; !done;) { WCHAR *extensionW = NULL; DWORD size = 1024; @@ -2142,6 +2142,8 @@ static BOOL cleanup_associations(void) hasChanged = TRUE; HeapFree(GetProcessHeap(), 0, desktopFile); } + else + i++; HeapFree(GetProcessHeap(), 0, command); } else
1
0
0
0
Dmitry Timoshkov : server: FILE_OVERWRITE and FILE_OVERWRITE_IF need the FILE_WRITE_ATTRIBUTES permission .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: f834d2319738c57f9a1eebd69bca88eecb75f6a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f834d2319738c57f9a1eebd69…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Mar 30 18:08:49 2011 +0900 server: FILE_OVERWRITE and FILE_OVERWRITE_IF need the FILE_WRITE_ATTRIBUTES permission. --- dlls/ntdll/tests/file.c | 14 -------------- server/file.c | 4 +++- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 4f6c7dc..ac4ff19 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1609,20 +1609,6 @@ static void test_NtCreateFile(void) td[i].attrib_in, FILE_SHARE_READ|FILE_SHARE_WRITE, td[i].disposition, 0, NULL, 0); - /* FIXME: completely remove once Wine is fixed */ - if (td[i].status == STATUS_ACCESS_DENIED) - { - todo_wine - ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); - CloseHandle(handle); - SetFileAttributesW(path, FILE_ATTRIBUTE_ARCHIVE); - - if (td[i].needs_cleanup) - DeleteFileW(path); - - continue; - } - ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); if (!status) diff --git a/server/file.c b/server/file.c index ee7202b..8cf474b 100644 --- a/server/file.c +++ b/server/file.c @@ -179,10 +179,12 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si { case FILE_CREATE: flags = O_CREAT | O_EXCL; break; case FILE_OVERWRITE_IF: /* FIXME: the difference is whether we trash existing attr or not */ + access |= FILE_WRITE_ATTRIBUTES; case FILE_SUPERSEDE: flags = O_CREAT | O_TRUNC; break; case FILE_OPEN: flags = 0; break; case FILE_OPEN_IF: flags = O_CREAT; break; - case FILE_OVERWRITE: flags = O_TRUNC; break; + case FILE_OVERWRITE: flags = O_TRUNC; + access |= FILE_WRITE_ATTRIBUTES; break; default: set_error( STATUS_INVALID_PARAMETER ); goto done; }
1
0
0
0
Dmitry Timoshkov : ntdll: Add more NtCreateFile tests.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 0cc619ccc5c5370a6849fa026523120445e9ffc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0cc619ccc5c5370a6849fa026…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Mar 30 18:08:39 2011 +0900 ntdll: Add more NtCreateFile tests. --- dlls/ntdll/tests/file.c | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index cc91eb6..4f6c7dc 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1568,13 +1568,19 @@ static void test_NtCreateFile(void) /* 3*/{ FILE_OPEN, FILE_ATTRIBUTE_READONLY, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE, TRUE }, /* 4*/{ FILE_OPEN, FILE_ATTRIBUTE_READONLY, STATUS_OBJECT_NAME_NOT_FOUND, 0, 0, FALSE }, /* 5*/{ FILE_OPEN_IF, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /* 6*/{ FILE_OPEN_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /* 7*/{ FILE_OVERWRITE, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /* 8*/{ FILE_OVERWRITE_IF, 0, STATUS_ACCESS_DENIED, 0, 0, FALSE }, - /* 9*/{ FILE_OVERWRITE_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /*10*/{ FILE_SUPERSEDE, 0, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /*11*/{ FILE_SUPERSEDE, FILE_ATTRIBUTE_READONLY, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, TRUE }, - /*12*/{ FILE_SUPERSEDE, FILE_ATTRIBUTE_READONLY, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, TRUE } + /* 6*/{ FILE_OPEN_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE, TRUE }, + /* 7*/{ FILE_OPEN_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, + /* 8*/{ FILE_OPEN_IF, 0, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, + /* 9*/{ FILE_OVERWRITE, 0, STATUS_ACCESS_DENIED, 0, 0, TRUE }, + /*10*/{ FILE_OVERWRITE, 0, STATUS_OBJECT_NAME_NOT_FOUND, 0, 0, FALSE }, + /*11*/{ FILE_CREATE, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, + /*12*/{ FILE_OVERWRITE, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, + /*13*/{ FILE_OVERWRITE_IF, 0, STATUS_ACCESS_DENIED, 0, 0, TRUE }, + /*14*/{ FILE_OVERWRITE_IF, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, + /*15*/{ FILE_OVERWRITE_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, + /*16*/{ FILE_SUPERSEDE, 0, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, + /*17*/{ FILE_SUPERSEDE, FILE_ATTRIBUTE_READONLY, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, TRUE }, + /*18*/{ FILE_SUPERSEDE, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, TRUE } }; static const WCHAR fooW[] = {'f','o','o',0}; static const WCHAR dotW[] = {'.',0}; @@ -1610,17 +1616,15 @@ static void test_NtCreateFile(void) ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); CloseHandle(handle); SetFileAttributesW(path, FILE_ATTRIBUTE_ARCHIVE); - continue; - } - ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); + if (td[i].needs_cleanup) + DeleteFileW(path); - if (status == STATUS_ACCESS_DENIED) - { - SetFileAttributesW(path, FILE_ATTRIBUTE_ARCHIVE); continue; } + ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); + if (!status) { ok(io.Information == td[i].result,"%d: expected %#x got %#lx\n", i, td[i].result, io.Information);
1
0
0
0
Steven Wallace : ntdll: implemented ProcessDebugFlags in NtQueryInformationProcess.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: b3369e06c73f72ea8ff53223b22668854bfd9ac7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3369e06c73f72ea8ff53223b…
Author: Steven Wallace <swallace(a)wine-patches.sdwmail.homeunix.org> Date: Sun Mar 27 20:20:20 2011 -0700 ntdll: implemented ProcessDebugFlags in NtQueryInformationProcess. --- dlls/ntdll/process.c | 25 +++++++++++++++- dlls/ntdll/tests/info.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index b9b81ca..eff3f58 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -141,7 +141,6 @@ NTSTATUS WINAPI NtQueryInformationProcess( UNIMPLEMENTED_INFO_CLASS(ProcessForegroundInformation); UNIMPLEMENTED_INFO_CLASS(ProcessLUIDDeviceMapsEnabled); UNIMPLEMENTED_INFO_CLASS(ProcessBreakOnTermination); - UNIMPLEMENTED_INFO_CLASS(ProcessDebugFlags); UNIMPLEMENTED_INFO_CLASS(ProcessHandleTracing); case ProcessBasicInformation: @@ -314,6 +313,30 @@ NTSTATUS WINAPI NtQueryInformationProcess( else ret = STATUS_INFO_LENGTH_MISMATCH; break; + case ProcessDebugFlags: + len = sizeof(DWORD); + if (ProcessInformationLength == len) + { + if (!ProcessInformation) + ret = STATUS_ACCESS_VIOLATION; + else if (!ProcessHandle) + ret = STATUS_INVALID_HANDLE; + else + { + SERVER_START_REQ(get_process_info) + { + req->handle = wine_server_obj_handle( ProcessHandle ); + if ((ret = wine_server_call( req )) == STATUS_SUCCESS) + { + *(DWORD *)ProcessInformation = !reply->debugger_present; + } + } + SERVER_END_REQ; + } + } + else + ret = STATUS_INFO_LENGTH_MISMATCH; + break; case ProcessDefaultHardErrorMode: len = sizeof(process_error_mode); if (ProcessInformationLength == len) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 774e8a1..2d5c94f 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1028,6 +1028,78 @@ static void test_query_process_debug_object_handle(int argc, char **argv) ok(ret, "CloseHandle failed with last error %u\n", GetLastError()); } +static void test_query_process_debug_flags(int argc, char **argv) +{ + DWORD debug_flags = 0xdeadbeef; + char cmdline[MAX_PATH]; + PROCESS_INFORMATION pi; + STARTUPINFO si = { 0 }; + NTSTATUS status; + BOOL ret; + + sprintf(cmdline, "%s %s %s", argv[0], argv[1], "debuggee"); + + si.cb = sizeof(si); + ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS, NULL, NULL, &si, &pi); + ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + if (!ret) return; + + status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, + NULL, 0, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, + NULL, sizeof(debug_flags), NULL); + ok(status == STATUS_INVALID_HANDLE || status == STATUS_ACCESS_VIOLATION || broken(status == STATUS_INVALID_INFO_CLASS) /* W7PROX64 (32-bit) */, + "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, + NULL, sizeof(debug_flags), NULL); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + + status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, + &debug_flags, sizeof(debug_flags), NULL); + ok(status == STATUS_INVALID_HANDLE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, + &debug_flags, sizeof(debug_flags) - 1, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, + &debug_flags, sizeof(debug_flags) + 1, NULL); + ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); + + status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, + &debug_flags, sizeof(debug_flags), NULL); + ok(!status || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "NtQueryInformationProcess failed, status %#x.\n", status); + ok(debug_flags == TRUE|| broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected flag TRUE, got %x.\n", debug_flags); + + status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugFlags, + &debug_flags, sizeof(debug_flags), NULL); + ok(!status || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "NtQueryInformationProcess failed, status %#x.\n", status); + ok(debug_flags == FALSE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected flag FALSE, got %x.\n", debug_flags); + + for (;;) + { + DEBUG_EVENT ev; + + ret = WaitForDebugEvent(&ev, INFINITE); + ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); + if (!ret) break; + + if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; + + ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); + ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); + if (!ret) break; + } + + ret = CloseHandle(pi.hThread); + ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + ret = CloseHandle(pi.hProcess); + ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); +} + static void test_readvirtualmemory(void) { HANDLE process; @@ -1411,6 +1483,10 @@ START_TEST(info) trace("Starting test_query_process_debug_object_handle()\n"); test_query_process_debug_object_handle(argc, argv); + /* 0x1F ProcessDebugFlags */ + trace("Starting test_process_debug_flags()\n"); + test_query_process_debug_flags(argc, argv); + /* belongs into it's own file */ trace("Starting test_readvirtualmemory()\n"); test_readvirtualmemory();
1
0
0
0
André Hentschel : uxtheme/tests: Add tests for OpenThemeDataEx.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: d69c1bef4c2dcd74e3f6f78c6459b9ff4b8e93b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d69c1bef4c2dcd74e3f6f78c6…
Author: André Hentschel <webmaster(a)dawncrow.de> Date: Wed Mar 23 17:54:55 2011 +0100 uxtheme/tests: Add tests for OpenThemeDataEx. --- dlls/uxtheme/tests/system.c | 164 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 157 insertions(+), 7 deletions(-) diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index ad277a0..7f77546 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -33,17 +33,12 @@ static BOOL (WINAPI * pIsAppThemed)(VOID); static BOOL (WINAPI * pIsThemeActive)(VOID); static BOOL (WINAPI * pIsThemePartDefined)(HTHEME, int, int); static HTHEME (WINAPI * pOpenThemeData)(HWND, LPCWSTR); +static HTHEME (WINAPI * pOpenThemeDataEx)(HWND, LPCWSTR, DWORD); static HRESULT (WINAPI * pSetWindowTheme)(HWND, LPCWSTR, LPCWSTR); static HMODULE hUxtheme = 0; -#define UXTHEME_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hUxtheme, #func); \ - if(!p ## func) { \ - trace("GetProcAddress(%s) failed\n", #func); \ - FreeLibrary(hUxtheme); \ - return FALSE; \ - } +#define UXTHEME_GET_PROC(func) p ## func = (void*)GetProcAddress(hUxtheme, #func); static BOOL InitFunctionPtrs(void) { @@ -61,6 +56,7 @@ static BOOL InitFunctionPtrs(void) UXTHEME_GET_PROC(IsThemeActive) UXTHEME_GET_PROC(IsThemePartDefined) UXTHEME_GET_PROC(OpenThemeData) + UXTHEME_GET_PROC(OpenThemeDataEx) UXTHEME_GET_PROC(SetWindowTheme) } /* The following functions should be available, if not return FALSE. The Vista functions will @@ -71,7 +67,10 @@ static BOOL InitFunctionPtrs(void) !pGetWindowTheme || !pIsAppThemed || !pIsThemeActive || !pIsThemePartDefined || !pOpenThemeData || !pSetWindowTheme) + { + FreeLibrary(hUxtheme); return FALSE; + } return TRUE; } @@ -336,6 +335,153 @@ static void test_OpenThemeData(void) hWnd, GetLastError()); } +static void test_OpenThemeDataEx(void) +{ + HTHEME hTheme; + HWND hWnd; + BOOL bThemeActive; + BOOL bDestroyed; + + WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 }; + WCHAR szButtonClassList[] = {'B','u','t','t','o','n', 0 }; + WCHAR szButtonClassList2[] = {'b','U','t','T','o','N', 0 }; + WCHAR szClassList[] = {'B','u','t','t','o','n',';','L','i','s','t','B','o','x', 0 }; + + if (!pOpenThemeDataEx) + { + win_skip("OpenThemeDataEx not available\n"); + return; + } + + bThemeActive = pIsThemeActive(); + + /* All NULL */ + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(NULL, NULL, 0); + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_POINTER, + "Expected GLE() to be E_POINTER, got 0x%08x\n", + GetLastError()); + + /* A NULL hWnd and an invalid classlist without flags */ + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(NULL, szInvalidClassList, 0); + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, + "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(NULL, szClassList, 0); + if (bThemeActive) + { + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + } + else + { + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, + "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", + GetLastError()); + } + + /* Only do the bare minimum to get a valid hdc */ + hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); + if (!hWnd) return; + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, NULL, 0); + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_POINTER, + "Expected GLE() to be E_POINTER, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szInvalidClassList, 0); + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, + "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", + GetLastError()); + + if (!bThemeActive) + { + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); + ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); + todo_wine + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, + "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", + GetLastError()); + skip("No active theme, skipping rest of OpenThemeData tests\n"); + return; + } + + /* Only do the next checks if we have an active theme */ + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_FORCE_RECT_SIZING); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_NONCLIENT); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0x3); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + /* Test with bUtToN instead of Button */ + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szButtonClassList2, 0); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + SetLastError(0xdeadbeef); + hTheme = pOpenThemeDataEx(hWnd, szClassList, 0); + ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); + todo_wine + ok( GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got 0x%08x\n", + GetLastError()); + + bDestroyed = DestroyWindow(hWnd); + if (!bDestroyed) + trace("Window %p couldn't be destroyed : 0x%08x\n", + hWnd, GetLastError()); +} + static void test_GetCurrentThemeName(void) { BOOL bThemeActive; @@ -498,6 +644,10 @@ START_TEST(system) trace("Starting test_OpenThemeData()\n"); test_OpenThemeData(); + /* OpenThemeDataEx */ + trace("Starting test_OpenThemeDataEx()\n"); + test_OpenThemeDataEx(); + /* GetCurrentThemeName */ trace("Starting test_GetCurrentThemeName()\n"); test_GetCurrentThemeName();
1
0
0
0
André Hentschel : uxtheme: Add OpenThemeDataEx.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 0304a3e998d917be8bcf2ad5680ab500c9b646c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0304a3e998d917be8bcf2ad56…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Mar 23 19:29:59 2011 +0100 uxtheme: Add OpenThemeDataEx. --- dlls/uxtheme/system.c | 17 ++++++++++++++--- dlls/uxtheme/uxtheme.spec | 2 +- include/uxtheme.h | 5 +++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index b84e978..60e55ee 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -630,16 +630,19 @@ static LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, } /*********************************************************************** - * OpenThemeData (UXTHEME.@) + * OpenThemeDataEx (UXTHEME.61) */ -HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList) +HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags) { WCHAR szAppBuff[256]; WCHAR szClassBuff[256]; LPCWSTR pszAppName; LPCWSTR pszUseClassList; HTHEME hTheme = NULL; - TRACE("(%p,%s)\n", hwnd, debugstr_w(pszClassList)); + TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags); + + if(flags) + FIXME("unhandled flags: %x\n", flags); if(bThemeActive) { @@ -659,6 +662,14 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList) } /*********************************************************************** + * OpenThemeData (UXTHEME.@) + */ +HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist) +{ + return OpenThemeDataEx(hwnd, classlist, 0); +} + +/*********************************************************************** * GetWindowTheme (UXTHEME.@) * * Retrieve the last theme opened for a window. diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index f44aa6e..198957a 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -38,7 +38,7 @@ 46 stub -noname ClassicAdjustWindowRectEx 48 stub -noname GetThemeParseErrorInfo 60 stub -noname CreateThemeDataFromObjects -61 stub -noname OpenThemeDataEx +61 stdcall OpenThemeDataEx(ptr wstr long) 62 stub -noname ServerClearStockObjects 63 stub -noname MarkSelection diff --git a/include/uxtheme.h b/include/uxtheme.h index ef369dc..8e65f56 100644 --- a/include/uxtheme.h +++ b/include/uxtheme.h @@ -160,6 +160,10 @@ HTHEME WINAPI GetWindowTheme(HWND); #define HTTB_SIZINGTEMPLATE 0x0100 #define HTTB_SYSTEMSIZINGMARGINS 0x0200 +#define OTD_FORCE_RECT_SIZING 0x0001 +#define OTD_NONCLIENT 0x0002 +#define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT) + HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*, HRGN,POINT,WORD*); BOOL WINAPI IsAppThemed(void); @@ -168,6 +172,7 @@ BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int); BOOL WINAPI IsThemeDialogTextureEnabled(HWND); BOOL WINAPI IsThemePartDefined(HTHEME,int,int); HTHEME WINAPI OpenThemeData(HWND,LPCWSTR); +HTHEME WINAPI OpenThemeDataEx(HWND,LPCWSTR,DWORD); void WINAPI SetThemeAppProperties(DWORD); HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
1
0
0
0
David Hedberg : user32: Fix return value when passing a non-sibling preceding window to SetWindowPos .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: c764210731d4d4b6fda53bf27e2150b704e09ac8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c764210731d4d4b6fda53bf27…
Author: David Hedberg <dhedberg(a)codeweavers.com> Date: Tue Mar 22 02:40:46 2011 +0100 user32: Fix return value when passing a non-sibling preceding window to SetWindowPos. Acrobat Reader relies on SetWindowPos, with hwndInsertAfter set to a non-sibling window and no SWP_NOZORDER passed, to return true. --- dlls/user32/tests/win.c | 22 +++++++++------------- dlls/user32/winpos.c | 43 ++++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 67601b1..278a282 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2064,7 +2064,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) /* Returns TRUE also for windows that are not siblings */ ret = SetWindowPos(hwnd_child, hwnd2, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - todo_wine ok(ret, "Got %d\n", ret); + ok(ret, "Got %d\n", ret); check_active_state(hwnd2, hwnd2, hwnd2); ret = SetWindowPos(hwnd2, hwnd_child, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); @@ -2074,7 +2074,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) /* Does not seem to do anything even without passing flags, still returns TRUE */ GetWindowRect(hwnd_child, &rc1); ret = SetWindowPos(hwnd_child, hwnd2 , 1, 2, 3, 4, 0); - todo_wine ok(ret, "Got %d\n", ret); + ok(ret, "Got %d\n", ret); GetWindowRect(hwnd_child, &rc2); ok(rc1.left == rc2.left && rc1.top == rc2.top && rc1.right == rc2.right && rc1.bottom == rc2.bottom, @@ -2087,20 +2087,16 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) ret = SetWindowPos(hwnd2, hwnd_child, 1, 2, 3, 4, 0); ok(ret, "Got %d\n", ret); GetWindowRect(hwnd2, &rc2); - todo_wine - ok(rc1.left == rc2.left && rc1.top == rc2.top && - rc1.right == rc2.right && rc1.bottom == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); + ok(rc1.left == rc2.left && rc1.top == rc2.top && + rc1.right == rc2.right && rc1.bottom == rc2.bottom, + "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", + rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); check_active_state(hwnd2, hwnd2, hwnd2); - /* Restore window */ - SetWindowPos(hwnd2, HWND_TOP, rc1.left, rc1.top, rc1.right-rc1.left, rc1.bottom-rc1.top, 0); - /* .. and with these windows. */ GetWindowRect(hwnd_grandchild, &rc1); ret = SetWindowPos(hwnd_grandchild, hwnd_child2, 1, 2, 3, 4, 0); - todo_wine ok(ret, "Got %d\n", ret); + ok(ret, "Got %d\n", ret); GetWindowRect(hwnd_grandchild, &rc2); ok(rc1.left == rc2.left && rc1.top == rc2.top && rc1.right == rc2.right && rc1.bottom == rc2.bottom, @@ -2154,8 +2150,8 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) check_active_state(hwnd2, hwnd2, hwnd2); ret = SetWindowPos(hwnd, hwnd_desktop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - todo_wine ok(!ret, "Got %d\n", ret); - todo_wine check_active_state(hwnd2, hwnd2, hwnd2); + ok(!ret, "Got %d\n", ret); + check_active_state(hwnd2, hwnd2, hwnd2); DestroyWindow(hwnd_grandchild); DestroyWindow(hwnd_child); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 789238f..57ccb81 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1902,11 +1902,6 @@ static BOOL fixup_flags( WINDOWPOS *winpos ) /* Check hwndInsertAfter */ if (winpos->flags & SWP_NOZORDER) goto done; - /* fix sign extension */ - if (winpos->hwndInsertAfter == (HWND)0xffff) winpos->hwndInsertAfter = HWND_TOPMOST; - else if (winpos->hwndInsertAfter == (HWND)0xfffe) winpos->hwndInsertAfter = HWND_NOTOPMOST; - - /* hwndInsertAfter must be a sibling of the window */ if (winpos->hwndInsertAfter == HWND_TOP) { if (GetWindow(winpos->hwnd, GW_HWNDFIRST) == winpos->hwnd) @@ -1929,16 +1924,9 @@ static BOOL fixup_flags( WINDOWPOS *winpos ) } else { - if (GetAncestor( winpos->hwndInsertAfter, GA_PARENT ) != parent) ret = FALSE; - else - { - /* don't need to change the Zorder of hwnd if it's already inserted - * after hwndInsertAfter or when inserting hwnd after itself. - */ - if ((winpos->hwnd == winpos->hwndInsertAfter) || - (winpos->hwnd == GetWindow( winpos->hwndInsertAfter, GW_HWNDNEXT ))) - winpos->flags |= SWP_NOZORDER; - } + if ((winpos->hwnd == winpos->hwndInsertAfter) || + (winpos->hwnd == GetWindow( winpos->hwndInsertAfter, GW_HWNDNEXT ))) + winpos->flags |= SWP_NOZORDER; } done: WIN_ReleasePtr( wndPtr ); @@ -2033,8 +2021,29 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) UINT orig_flags; orig_flags = winpos->flags; - - /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */ + + /* First, check z-order arguments. */ + if (!(winpos->flags & SWP_NOZORDER)) + { + /* fix sign extension */ + if (winpos->hwndInsertAfter == (HWND)0xffff) winpos->hwndInsertAfter = HWND_TOPMOST; + else if (winpos->hwndInsertAfter == (HWND)0xfffe) winpos->hwndInsertAfter = HWND_NOTOPMOST; + + if (!(winpos->hwndInsertAfter == HWND_TOP || + winpos->hwndInsertAfter == HWND_BOTTOM || + winpos->hwndInsertAfter == HWND_TOPMOST || + winpos->hwndInsertAfter == HWND_NOTOPMOST)) + { + HWND parent = GetAncestor( winpos->hwnd, GA_PARENT ); + HWND insertafter_parent = GetAncestor( winpos->hwndInsertAfter, GA_PARENT ); + + /* hwndInsertAfter must be a sibling of the window */ + if (!insertafter_parent) return FALSE; + if (insertafter_parent != parent) return TRUE; + } + } + + /* Make sure that coordinates are valid for WM_WINDOWPOSCHANGING */ if (!(winpos->flags & SWP_NOMOVE)) { if (winpos->x < -32768) winpos->x = -32768;
1
0
0
0
David Hedberg : user32/tests: Add some more tests for SetWindowPos.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 955ec5017330aecc6bf4d462fe2c3b0a63fa1592 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=955ec5017330aecc6bf4d462f…
Author: David Hedberg <dhedberg(a)codeweavers.com> Date: Tue Mar 22 02:40:45 2011 +0100 user32/tests: Add some more tests for SetWindowPos. --- dlls/user32/tests/win.c | 219 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 175 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=955ec5017330aecc6bf4d…
1
0
0
0
Rico Schüller : d3dx9: Use init function for ID3DXBuffer.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 22abfd6edce6d396ea4cf54426ff8f6aafd41ee6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22abfd6edce6d396ea4cf5442…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:49 2011 +0200 d3dx9: Use init function for ID3DXBuffer. --- dlls/d3dx9_36/core.c | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index d94fae5..06a8305 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -116,27 +116,45 @@ static const struct ID3DXBufferVtbl ID3DXBufferImpl_Vtbl = ID3DXBufferImpl_GetBufferSize }; +static HRESULT d3dx9_buffer_init(struct ID3DXBufferImpl *buffer, DWORD size) +{ + buffer->ID3DXBuffer_iface.lpVtbl = &ID3DXBufferImpl_Vtbl; + buffer->ref = 1; + buffer->size = size; + + buffer->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); + if (!buffer->buffer) + { + ERR("Failed to allocate buffer memory\n"); + return E_OUTOFMEMORY; + } + + return D3D_OK; +} + HRESULT WINAPI D3DXCreateBuffer(DWORD size, LPD3DXBUFFER *buffer) { struct ID3DXBufferImpl *object; + HRESULT hr; object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (object == NULL) + if (!object) { - *buffer = NULL; + ERR("Failed to allocate buffer memory\n"); return E_OUTOFMEMORY; } - object->ID3DXBuffer_iface.lpVtbl = &ID3DXBufferImpl_Vtbl; - object->ref = 1; - object->size = size; - object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); - if (object->buffer == NULL) + + hr = d3dx9_buffer_init(object, size); + if (FAILED(hr)) { + WARN("Failed to initialize buffer, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); - *buffer = NULL; - return E_OUTOFMEMORY; + return hr; } *buffer = &object->ID3DXBuffer_iface; + + TRACE("Created ID3DBuffer %p\n", *buffer); + return D3D_OK; }
1
0
0
0
Rico Schüller : d3dx9: Add a some TRACEs to ID3DXBufferImpl.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 87f6f86ce9c54bff026db3013ff818b6303a368c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=87f6f86ce9c54bff026db3013…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:46 2011 +0200 d3dx9: Add a some TRACEs to ID3DXBufferImpl. --- dlls/d3dx9_36/core.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 22a5ccf..d94fae5 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -46,17 +46,18 @@ static inline struct ID3DXBufferImpl *impl_from_ID3DXBuffer(ID3DXBuffer *iface) static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(ID3DXBuffer *iface, REFIID riid, void **ppobj) { - struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), ppobj); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXBuffer)) { IUnknown_AddRef(iface); - *ppobj = This; + *ppobj = iface; return D3D_OK; } - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + return E_NOINTERFACE; } @@ -65,7 +66,7 @@ static ULONG WINAPI ID3DXBufferImpl_AddRef(ID3DXBuffer *iface) struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) : AddRef from %d\n", This, ref - 1); + TRACE("%p increasing refcount to %u\n", This, ref); return ref; } @@ -75,25 +76,32 @@ static ULONG WINAPI ID3DXBufferImpl_Release(ID3DXBuffer *iface) struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) : ReleaseRef to %d\n", This, ref); + TRACE("%p decreasing refcount to %u\n", This, ref); if (ref == 0) { HeapFree(GetProcessHeap(), 0, This->buffer); HeapFree(GetProcessHeap(), 0, This); } + return ref; } static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(ID3DXBuffer *iface) { struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + + TRACE("iface %p\n", iface); + return This->buffer; } static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(ID3DXBuffer *iface) { struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + + TRACE("iface %p\n", iface); + return This->size; }
1
0
0
0
Rico Schüller : d3dx9: Rename some variables.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 404de72fe097d325eeed30625e99721242cab3bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=404de72fe097d325eeed30625…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:43 2011 +0200 d3dx9: Rename some variables. --- dlls/d3dx9_36/core.c | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 26eec9b..22a5ccf 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -35,8 +35,8 @@ struct ID3DXBufferImpl ID3DXBuffer ID3DXBuffer_iface; LONG ref; - DWORD *buffer; - DWORD bufferSize; + void *buffer; + DWORD size; }; static inline struct ID3DXBufferImpl *impl_from_ID3DXBuffer(ID3DXBuffer *iface) @@ -94,39 +94,41 @@ static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(ID3DXBuffer *iface) static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(ID3DXBuffer *iface) { struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); - return This->bufferSize; + return This->size; } -const ID3DXBufferVtbl D3DXBuffer_Vtbl = +static const struct ID3DXBufferVtbl ID3DXBufferImpl_Vtbl = { + /* IUnknown methods */ ID3DXBufferImpl_QueryInterface, ID3DXBufferImpl_AddRef, ID3DXBufferImpl_Release, + /* ID3DXBuffer methods */ ID3DXBufferImpl_GetBufferPointer, ID3DXBufferImpl_GetBufferSize }; -HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) +HRESULT WINAPI D3DXCreateBuffer(DWORD size, LPD3DXBUFFER *buffer) { struct ID3DXBufferImpl *object; object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (object == NULL) { - *ppBuffer = NULL; + *buffer = NULL; return E_OUTOFMEMORY; } - object->ID3DXBuffer_iface.lpVtbl = &D3DXBuffer_Vtbl; + object->ID3DXBuffer_iface.lpVtbl = &ID3DXBufferImpl_Vtbl; object->ref = 1; - object->bufferSize = NumBytes; - object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes); + object->size = size; + object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); if (object->buffer == NULL) { HeapFree(GetProcessHeap(), 0, object); - *ppBuffer = NULL; + *buffer = NULL; return E_OUTOFMEMORY; } - *ppBuffer = &object->ID3DXBuffer_iface; + *buffer = &object->ID3DXBuffer_iface; return D3D_OK; }
1
0
0
0
Rico Schüller : d3dx9: Remove typedef from ID3DXBufferImpl.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 62c1fb0941a723b399f6f31e91d4a3cd10eb5574 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62c1fb0941a723b399f6f31e9…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:40 2011 +0200 d3dx9: Remove typedef from ID3DXBufferImpl. --- dlls/d3dx9_36/core.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index c1e9641..26eec9b 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -30,23 +30,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -typedef struct ID3DXBufferImpl +struct ID3DXBufferImpl { ID3DXBuffer ID3DXBuffer_iface; LONG ref; DWORD *buffer; DWORD bufferSize; -} ID3DXBufferImpl; +}; -static inline ID3DXBufferImpl *impl_from_ID3DXBuffer(ID3DXBuffer *iface) +static inline struct ID3DXBufferImpl *impl_from_ID3DXBuffer(ID3DXBuffer *iface) { - return CONTAINING_RECORD(iface, ID3DXBufferImpl, ID3DXBuffer_iface); + return CONTAINING_RECORD(iface, struct ID3DXBufferImpl, ID3DXBuffer_iface); } static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(ID3DXBuffer *iface, REFIID riid, void **ppobj) { - ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXBuffer)) @@ -62,7 +62,7 @@ static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(ID3DXBuffer *iface, REFIID static ULONG WINAPI ID3DXBufferImpl_AddRef(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) : AddRef from %d\n", This, ref - 1); @@ -72,7 +72,7 @@ static ULONG WINAPI ID3DXBufferImpl_AddRef(ID3DXBuffer *iface) static ULONG WINAPI ID3DXBufferImpl_Release(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) : ReleaseRef to %d\n", This, ref); @@ -87,13 +87,13 @@ static ULONG WINAPI ID3DXBufferImpl_Release(ID3DXBuffer *iface) static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); return This->buffer; } static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); return This->bufferSize; } @@ -108,7 +108,7 @@ const ID3DXBufferVtbl D3DXBuffer_Vtbl = HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) { - ID3DXBufferImpl *object; + struct ID3DXBufferImpl *object; object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (object == NULL)
1
0
0
0
Rico Schüller : d3dx9: Use variable instead of type in HeapAlloc.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 98001ca8c84e880cbbb788ba3a2ba0ce0e663722 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98001ca8c84e880cbbb788ba3…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:37 2011 +0200 d3dx9: Use variable instead of type in HeapAlloc. --- dlls/d3dx9_36/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 6990fbd..c1e9641 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -110,7 +110,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) { ID3DXBufferImpl *object; - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXBufferImpl)); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (object == NULL) { *ppBuffer = NULL;
1
0
0
0
Rico Schüller : d3dx9: Don' t zero memory when it will be overridden.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 41e34d77c51734b54ef6240f133a7b9a9c9382dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41e34d77c51734b54ef6240f1…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Mar 30 12:51:08 2011 +0200 d3dx9: Don't zero memory when it will be overridden. --- dlls/d3dx9_36/effect.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index d06c9ac..3f89eb8 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -2684,7 +2684,7 @@ HRESULT WINAPI D3DXCreateEffectFromFileExA(LPDIRECT3DDEVICE9 device, LPCSTR srcf return D3DERR_INVALIDCALL; len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); - srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(*srcfileW)); + srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW)); MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); ret = D3DXCreateEffectFromFileExW(device, srcfileW, defines, include, skipconstants, flags, pool, effect, compilationerrors); @@ -2821,7 +2821,7 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(LPCSTR srcfile, const D3DXMACRO return D3DERR_INVALIDCALL; len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); - srcfileW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(*srcfileW)); + srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW)); MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); ret = D3DXCreateEffectCompilerFromFileW(srcfileW, defines, include, flags, effectcompiler, parseerrors);
1
0
0
0
Hans Leidekker : msi: Avoid sprintf for simple concatenations.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 6f552fd2f72d42097e684fb19e5987582b3154a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f552fd2f72d42097e684fb19…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:32:39 2011 +0200 msi: Avoid sprintf for simple concatenations. --- dlls/msi/package.c | 5 +- dlls/msi/registry.c | 342 +++++++++++++++++++++----------------------------- 2 files changed, 147 insertions(+), 200 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6f552fd2f72d42097e684…
1
0
0
0
Hans Leidekker : msi: Make sure to access the 64-bit portion of the registry where needed on Wow64 .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 881ff642a2130df414c022305ff06dabbeda9e95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=881ff642a2130df414c022305…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:32:21 2011 +0200 msi: Make sure to access the 64-bit portion of the registry where needed on Wow64. --- dlls/msi/registry.c | 600 +++++++++++++++++++++------------------------------ 1 files changed, 247 insertions(+), 353 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=881ff642a2130df414c02…
1
0
0
0
Hans Leidekker : msi/tests: Remove unneeded Wow64 checks.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: a0a7a7fc3d5548a1b9b402c4fd46072ea2b53e2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0a7a7fc3d5548a1b9b402c4f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:57 2011 +0200 msi/tests: Remove unneeded Wow64 checks. --- dlls/msi/tests/action.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 70fd066..2643e39 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -2546,7 +2546,7 @@ static void test_register_product(void) res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -2653,7 +2653,7 @@ static void test_register_product(void) res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, access, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3616,7 +3616,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3699,7 +3699,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3759,7 +3759,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3819,7 +3819,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3902,7 +3902,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -4550,7 +4550,7 @@ static void test_write_registry_values(void) ok(delete_pf("msitest\\augustus", TRUE), "File installed\n"); ok(delete_pf("msitest", FALSE), "File installed\n"); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Wine\\msitest", 0, KEY_ALL_ACCESS, &hkey); else res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, KEY_ALL_ACCESS, &hkey); @@ -5318,7 +5318,7 @@ static void test_remove_registry_values(void) ok(res == ERROR_SUCCESS, "key removed\n"); RegCloseKey(key); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\key2", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5336,7 +5336,7 @@ static void test_remove_registry_values(void) r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\key1", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5355,7 +5355,7 @@ static void test_remove_registry_values(void) ok(res == ERROR_SUCCESS, "key removed\n"); RegCloseKey(key); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\keyB", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5649,7 +5649,7 @@ static void test_register_class_info(void) } ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); else res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); @@ -5667,7 +5667,7 @@ static void test_register_class_info(void) r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); else res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
1
0
0
0
Hans Leidekker : msi: Implement MsiGetFileSignatureInformationA/W.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: f3f25af9002d4f3386f1eb372173b80ace4cf164 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3f25af9002d4f3386f1eb372…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:35 2011 +0200 msi: Implement MsiGetFileSignatureInformationA/W. --- dlls/msi/Makefile.in | 2 +- dlls/msi/msi.c | 80 +++++++++++++++++++++++++++++++++++++++++--------- dlls/msi/tests/msi.c | 43 ++++++++++++++++++++++++++- 3 files changed, 109 insertions(+), 16 deletions(-) diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index 8217bcf..066398e 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -1,7 +1,7 @@ MODULE = msi.dll IMPORTLIB = msi IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 -DELAYIMPORTS = odbccp32 +DELAYIMPORTS = odbccp32 wintrust crypt32 C_SRCS = \ action.c \ diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 325a5b0..890132a 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -28,7 +28,6 @@ #include "winreg.h" #include "winnls.h" #include "shlwapi.h" -#include "wine/debug.h" #include "msi.h" #include "msidefs.h" #include "msiquery.h" @@ -39,6 +38,10 @@ #include "shlobj.h" #include "shobjidl.h" #include "objidl.h" +#include "wintrust.h" +#include "softpub.h" + +#include "wine/debug.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -2261,22 +2264,71 @@ UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor, return ERROR_CALL_NOT_IMPLEMENTED; } -HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR szSignedObjectPath, - DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, LPBYTE pbHashData, - LPDWORD pcbHashData) +HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT_CONTEXT *cert, + LPBYTE hash, LPDWORD hashlen ) { - FIXME("%s %08x %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags, - ppcCertContext, pbHashData, pcbHashData); - return ERROR_CALL_NOT_IMPLEMENTED; + UINT r; + WCHAR *pathW = NULL; + + TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen); + + if (path && !(pathW = strdupAtoW( path ))) return ERROR_OUTOFMEMORY; + r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen ); + msi_free( pathW ); + return r; } -HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR szSignedObjectPath, - DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, LPBYTE pbHashData, - LPDWORD pcbHashData) -{ - FIXME("%s %08x %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags, - ppcCertContext, pbHashData, pcbHashData); - return ERROR_CALL_NOT_IMPLEMENTED; +HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCERT_CONTEXT *cert, + LPBYTE hash, LPDWORD hashlen ) +{ + static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; + HRESULT hr; + WINTRUST_DATA data; + WINTRUST_FILE_INFO info; + CRYPT_PROVIDER_SGNR *signer; + CRYPT_PROVIDER_CERT *provider; + + TRACE("%s %08x %p %p %p\n", debugstr_w(path), flags, cert, hash, hashlen); + + if (!path || !cert) return E_INVALIDARG; + + info.cbStruct = sizeof(info); + info.pcwszFilePath = path; + info.hFile = NULL; + info.pgKnownSubject = NULL; + + data.cbStruct = sizeof(data); + data.pPolicyCallbackData = NULL; + data.pSIPClientData = NULL; + data.dwUIChoice = WTD_UI_NONE; + data.fdwRevocationChecks = WTD_REVOKE_WHOLECHAIN; + data.dwUnionChoice = WTD_CHOICE_FILE; + data.u.pFile = &info; + data.dwStateAction = WTD_STATEACTION_VERIFY; + data.hWVTStateData = NULL; + data.pwszURLReference = NULL; + data.dwProvFlags = 0; + data.dwUIContext = WTD_UICONTEXT_INSTALL; + hr = WinVerifyTrustEx( INVALID_HANDLE_VALUE, &generic_verify_v2, &data ); + if (FAILED(hr)) return hr; + + signer = WTHelperGetProvSignerFromChain( data.hWVTStateData, 0, FALSE, 0 ); + if (!signer) return TRUST_E_NOSIGNATURE; + if (hash) + { + DWORD len = signer->psSigner->EncryptedHash.cbData; + if (*hashlen < len) + { + *hashlen = len; + return HRESULT_FROM_WIN32(ERROR_MORE_DATA); + } + memcpy( hash, signer->psSigner->EncryptedHash.pbData, len ); + *hashlen = len; + } + provider = WTHelperGetProvCertFromChain( signer, 0 ); + if (!provider) return TRUST_E_PROVIDER_UNKNOWN; + *cert = CertDuplicateCertificateContext( provider->pCert ); + return S_OK; } /****************************************************************** diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index e21d1e1..6ba0e11 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -11753,6 +11753,47 @@ static void test_MsiEnumProducts(void) LocalFree(usersid); } +static void test_MsiGetFileSignatureInformation(void) +{ + HRESULT hr; + const CERT_CONTEXT *cert; + DWORD len; + + hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( NULL, 0, &cert, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); + todo_wine ok(hr == CRYPT_E_FILE_ERROR, "expected CRYPT_E_FILE_ERROR got 0x%08x\n", hr); + + create_file( "signature.bin", "signature", sizeof("signature") ); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); + todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got 0x%08x\n", hr); + + DeleteFileA( "signature.bin" ); +} + START_TEST(msi) { init_functionpointers(); @@ -11786,6 +11827,6 @@ START_TEST(msi) test_MsiGetPatchInfo(); test_MsiEnumProducts(); } - test_MsiGetFileVersion(); + test_MsiGetFileSignatureInformation(); }
1
0
0
0
Hans Leidekker : msi: Accept whitespace-only property values on the command line.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 8d58ddfe12a1b299c18f683dc93b5df1b0805e3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d58ddfe12a1b299c18f683dc…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:19 2011 +0200 msi: Accept whitespace-only property values on the command line. --- dlls/msi/action.c | 10 +++++----- dlls/msi/tests/install.c | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index abee14c..a5a1e33 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -276,7 +276,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes ) break; case ' ': state = state_whitespace; - if (!count || !len) goto done; + if (!count) goto done; in_quotes = 1; break; default: @@ -317,7 +317,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case ) { LPCWSTR ptr, ptr2; - int quotes; + int num_quotes; DWORD len; WCHAR *prop, *val; UINT r; @@ -345,10 +345,10 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, ptr2++; while (*ptr2 == ' ') ptr2++; - quotes = 0; + num_quotes = 0; val = msi_alloc( (strlenW( ptr2 ) + 1) * sizeof(WCHAR) ); - len = parse_prop( ptr2, val, "es ); - if (quotes % 2) + len = parse_prop( ptr2, val, &num_quotes ); + if (num_quotes % 2) { WARN("unbalanced quotes\n"); msi_free( val ); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 9e8535a..1f5ab9c 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6282,6 +6282,10 @@ static void test_command_line_parsing(void) r = MsiInstallProductA(msifile, cmd); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + cmd = "P=\" \""; + r = MsiInstallProductA(msifile, cmd); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + cmd = "P=one"; r = MsiInstallProductA(msifile, cmd); ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
1
0
0
0
Hans Leidekker : msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: e4d19fc47b37ad6c375171811a18a4eae082884d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4d19fc47b37ad6c375171811…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:04 2011 +0200 msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey. --- dlls/msi/action.c | 4 ++-- dlls/msi/msipriv.h | 4 ++-- dlls/msi/package.c | 2 +- dlls/msi/registry.c | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a21f234..abee14c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5286,7 +5286,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) if (!msi_check_publish(package)) return ERROR_SUCCESS; - rc = MSIREG_OpenUninstallKey(package, &hkey, TRUE); + rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE); if (rc != ERROR_SUCCESS) return rc; @@ -5366,7 +5366,7 @@ static UINT msi_unpublish_product(MSIPACKAGE *package, WCHAR *remove) MSIREG_DeleteProductKey(package->ProductCode); MSIREG_DeleteUserDataProductKey(package->ProductCode); - MSIREG_DeleteUninstallKey(package); + MSIREG_DeleteUninstallKey(package->ProductCode, package->platform); MSIREG_DeleteLocalClassesProductKey(package->ProductCode); MSIREG_DeleteLocalClassesFeaturesKey(package->ProductCode); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 7af99a6..19e9be8 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -829,8 +829,8 @@ extern BOOL unsquash_guid(LPCWSTR in, LPWSTR out); extern BOOL squash_guid(LPCWSTR in, LPWSTR out); extern BOOL encode_base85_guid(GUID *,LPWSTR); extern BOOL decode_base85_guid(LPCWSTR,GUID*); -extern UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create); -extern UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package); +extern UINT MSIREG_OpenUninstallKey(const WCHAR *, enum platform, HKEY *, BOOL); +extern UINT MSIREG_DeleteUninstallKey(const WCHAR *, enum platform); extern UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY* key, BOOL create); extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context, diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 00ed9f8..88cf34d 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -449,7 +449,7 @@ static UINT set_installed_prop( MSIPACKAGE *package ) HKEY hkey = 0; UINT r; - r = MSIREG_OpenUninstallKey( package, &hkey, FALSE ); + r = MSIREG_OpenUninstallKey( package->ProductCode, package->platform, &hkey, FALSE ); if (r == ERROR_SUCCESS) { RegCloseKey( hkey ); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index e146d82..60deeb9 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -525,17 +525,17 @@ static WCHAR *get_user_sid(void) return ret; } -UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create) +UINT MSIREG_OpenUninstallKey(const WCHAR *product, enum platform platform, HKEY *key, BOOL create) { UINT rc; WCHAR keypath[0x200]; - TRACE("%s\n", debugstr_w(package->ProductCode)); + TRACE("%s\n", debugstr_w(product)); - if (is_64bit && package->platform == PLATFORM_INTEL) - sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode); + if (is_64bit && platform == PLATFORM_INTEL) + sprintfW(keypath, szUninstall_32node_fmt, product); else - sprintfW(keypath, szUninstall_fmt, package->ProductCode); + sprintfW(keypath, szUninstall_fmt, product); if (create) rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL); @@ -545,16 +545,16 @@ UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create) return rc; } -UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package) +UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform) { WCHAR keypath[0x200]; - TRACE("%s\n", debugstr_w(package->ProductCode)); + TRACE("%s\n", debugstr_w(product)); - if (is_64bit && package->platform == PLATFORM_INTEL) - sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode); + if (is_64bit && platform == PLATFORM_INTEL) + sprintfW(keypath, szUninstall_32node_fmt, product); else - sprintfW(keypath, szUninstall_fmt, package->ProductCode); + sprintfW(keypath, szUninstall_fmt, product); return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath); }
1
0
0
0
Hans Leidekker : msi: Allocate the user token dynamically.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 6ad992c40722cd385e378e18835156e0799029d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ad992c40722cd385e378e188…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:49 2011 +0200 msi: Allocate the user token dynamically. --- dlls/msi/registry.c | 156 +++++++++++++++++++++----------------------------- 1 files changed, 66 insertions(+), 90 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6ad992c40722cd385e378…
1
0
0
0
Hans Leidekker : msi/tests: Allocate the user token dynamically and unify implementations.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 419496d0c8156e1cbf864c0d64a36301bbde653a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=419496d0c8156e1cbf864c0d6…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:35 2011 +0200 msi/tests: Allocate the user token dynamically and unify implementations. --- dlls/msi/tests/action.c | 34 +++++++++++++++++----------------- dlls/msi/tests/msi.c | 44 ++++++++++++++++++++++---------------------- dlls/msi/tests/package.c | 26 +++++++++++++------------- dlls/msi/tests/source.c | 45 ++++++++++++++++++++++++--------------------- 4 files changed, 76 insertions(+), 73 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=419496d0c8156e1cbf864…
1
0
0
0
Hans Leidekker : msi/tests: Get rid of workarounds for win9x test failures.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: c505c0fe985e769e3eb5a410480ec331b0d43c11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c505c0fe985e769e3eb5a4104…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:17 2011 +0200 msi/tests: Get rid of workarounds for win9x test failures. --- dlls/msi/tests/automation.c | 28 +++------ dlls/msi/tests/db.c | 16 +---- dlls/msi/tests/install.c | 130 +++++++------------------------------------ dlls/msi/tests/msi.c | 4 +- dlls/msi/tests/package.c | 31 ++--------- 5 files changed, 40 insertions(+), 169 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c505c0fe985e769e3eb5a…
1
0
0
0
Hans Leidekker : msi: Ignore invalid upgrade codes in the PublishProduct action.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: e82a4896f39bea9d5d31de93813ba7b9d468bc32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e82a4896f39bea9d5d31de938…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:29:59 2011 +0200 msi: Ignore invalid upgrade codes in the PublishProduct action. --- dlls/msi/action.c | 19 +++------ dlls/msi/tests/install.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 12 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2f0b739..a21f234 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4364,26 +4364,21 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package) return ERROR_SUCCESS; if (package->Context == MSIINSTALLCONTEXT_MACHINE) - { r = MSIREG_OpenClassesUpgradeCodesKey(upgrade, &hkey, TRUE); - if (r != ERROR_SUCCESS) - goto done; - } else - { r = MSIREG_OpenUserUpgradeCodesKey(upgrade, &hkey, TRUE); - if (r != ERROR_SUCCESS) - goto done; - } + if (r != ERROR_SUCCESS) + { + WARN("failed to open upgrade code key\n"); + msi_free(upgrade); + return ERROR_SUCCESS; + } squash_guid(package->ProductCode, squashed_pc); msi_reg_set_val_str(hkey, squashed_pc, NULL); - RegCloseKey(hkey); - -done: msi_free(upgrade); - return r; + return ERROR_SUCCESS; } static BOOL msi_check_publish(MSIPACKAGE *package) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index deff5f7..fb71f9d 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1191,6 +1191,53 @@ static const CHAR cl_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "InstallValidate\t\t1400\n" "InstallFinalize\t\t5000\n"; +static const CHAR uc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "upgradecode.txt\tupgradecode\tupgradecode.txt\t1000\t\t\t8192\t1\n"; + +static const CHAR uc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "upgradecode\t\t\tupgradecode feature\t1\t2\tMSITESTDIR\t0\n"; + +static const CHAR uc_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "upgradecode\tupgradecode\n"; + +static const CHAR uc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "upgradecode\t{6952B732-2FCB-4E47-976F-989FCBD7EDFB}\tMSITESTDIR\t0\t\tupgradecode.txt\n"; + +static const CHAR uc_property_dat[] = "Property\tValue\n" + "s72\tl0\n" + "Property\tProperty\n" + "INSTALLLEVEL\t3\n" + "ProductCode\t{E5FB1241-F547-4BA7-A60E-8E75797268D4}\n" + "ProductName\tMSITEST\n" + "ProductVersion\t1.1.1\n" + "UpgradeCode\t#UPGEADECODE#\n" + "MSIFASTINSTALL\t1\n"; + +static const CHAR uc_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "LaunchConditions\t\t100\n" + "CostInitialize\t\t200\n" + "FileCost\t\t300\n" + "CostFinalize\t\t400\n" + "InstallInitialize\t\t500\n" + "ProcessComponents\t\t600\n" + "InstallValidate\t\t700\n" + "RemoveFiles\t\t800\n" + "InstallFiles\t\t900\n" + "RegisterProduct\t\t1000\n" + "PublishFeatures\t\t1100\n" + "PublishProduct\t\t1200\n" + "InstallFinalize\t\t1300\n"; + typedef struct _msi_table { const CHAR *filename; @@ -1870,6 +1917,18 @@ static const msi_table cl_tables[] = ADD_TABLE(property) }; +static const msi_table uc_tables[] = +{ + ADD_TABLE(directory), + ADD_TABLE(uc_component), + ADD_TABLE(uc_feature), + ADD_TABLE(uc_feature_comp), + ADD_TABLE(uc_file), + ADD_TABLE(uc_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(uc_property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -6373,6 +6432,38 @@ static void test_command_line_parsing(void) RemoveDirectory("msitest"); } +static void test_upgrade_code(void) +{ + UINT r; + + if (is_process_limited()) + { + skip("process is limited\n"); + return; + } + + CreateDirectoryA("msitest", NULL); + create_file("msitest\\upgradecode.txt", 1000); + create_database(msifile, uc_tables, sizeof(uc_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(pf_exists("msitest\\upgradecode.txt"), "file not installed\n"); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(!delete_pf("msitest\\upgradecode.txt", TRUE), "file not removed\n"); + ok(!delete_pf("msitest", FALSE), "directory not removed\n"); + + DeleteFileA("msitest\\upgradecode.txt"); + RemoveDirectoryA("msitest"); + DeleteFile(msifile); +} + START_TEST(install) { DWORD len; @@ -6463,6 +6554,7 @@ START_TEST(install) test_sourcedir_props(); test_package_validation(); test_command_line_parsing(); + test_upgrade_code(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : mscms: Trace the CMM id as a string.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 8800772f2d1237312fa28399ca953ddbae8737ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8800772f2d1237312fa28399c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:29:45 2011 +0200 mscms: Trace the CMM id as a string. --- dlls/mscms/stub.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/mscms/stub.c b/dlls/mscms/stub.c index d7e6877..84c0cdc 100644 --- a/dlls/mscms/stub.c +++ b/dlls/mscms/stub.c @@ -137,21 +137,21 @@ BOOL WINAPI GetPS2ColorSpaceArray( HPROFILE profile, DWORD intent, DWORD type, P BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI SelectCMM( DWORD id ) { - FIXME( "(%x) stub\n", id ); + FIXME( "(%s) stub\n", MSCMS_dbgstr_tag(id) ); return TRUE; } @@ -190,14 +190,14 @@ BOOL WINAPI SpoolerCopyFileEvent( LPWSTR printer, LPWSTR key, DWORD event ) BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); return TRUE; } BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); return TRUE; }
1
0
0
0
Hans Leidekker : wine.inf: Pretend that the .NET 4. 0 Client and Full profiles are installed.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 5dbf6359d2657807cb4de4e452a78f425677127b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5dbf6359d2657807cb4de4e45…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:29:28 2011 +0200 wine.inf: Pretend that the .NET 4.0 Client and Full profiles are installed. --- tools/wine.inf.in | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 5c09faf..cb130e6 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -511,6 +511,12 @@ HKLM,Software\Microsoft\NET Framework Setup\NDP\v3.5,Install,0x10003,1 HKLM,Software\Microsoft\NET Framework Setup\NDP\v3.5,SP,0x10003,1 HKLM,Software\Microsoft\NET Framework Setup\NDP\v3.5,Version,2,3.5.30729.01 HKLM,Software\Microsoft\NET Framework Setup\NDP\v3.5\1033,Install,0x10003,1 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Client,Install,0x10003,1 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Client,Version,2,4.0.30319 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Client,TargetVersion,2,4.0.0 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Full,Install,0x10003,1 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Full,Version,2,4.0.30319 +HKLM,Software\Microsoft\NET Framework Setup\NDP\v4\Full,TargetVersion,2,4.0.0 [Metrics] HKCU,%Metrics%,"ScrollWidth",2,"16"
1
0
0
0
Jörg Höhle : user32/tests: Add a few IsWindow checks.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 8d387f06eb7df5ad42b1b0b012cfa356f34f5510 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d387f06eb7df5ad42b1b0b01…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Tue Mar 15 22:58:39 2011 +0100 user32/tests: Add a few IsWindow checks. --- dlls/user32/tests/win.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 603e93e..b1d77c6 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -3936,6 +3936,10 @@ static void test_params(void) HWND hwnd; INT rc; + ok(!IsWindow(0), "IsWindow(0)\n"); + ok(!IsWindow(HWND_BROADCAST), "IsWindow(HWND_BROADCAST)\n"); + ok(!IsWindow(HWND_TOPMOST), "IsWindow(HWND_TOPMOST)\n"); + /* Just a param check */ if (pGetMonitorInfoA) {
1
0
0
0
Jörg Höhle : winmm: PlaySound concurrency cleanup .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: e0dcc2cd7d4495b7056a47ada1af74cc7c318ef2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0dcc2cd7d4495b7056a47ada…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Mon Mar 28 22:34:02 2011 +0200 winmm: PlaySound concurrency cleanup. --- dlls/winmm/playsound.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 3624124..02e24e8 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -44,7 +44,6 @@ typedef struct tagWINE_PLAYSOUND LPCWSTR pszSound; HMODULE hMod; DWORD fdwSound; - HANDLE hThread; struct tagWINE_PLAYSOUND* lpNext; } WINE_PLAYSOUND; @@ -215,7 +214,6 @@ static void PlaySound_Free(WINE_PLAYSOUND* wps) if (PlaySoundList == NULL) SetEvent(psLastEvent); LeaveCriticalSection(&WINMM_cs); if (wps->bAlloc) HeapFree(GetProcessHeap(), 0, (void*)wps->pszSound); - if (wps->hThread) CloseHandle(wps->hThread); HeapFree(GetProcessHeap(), 0, wps); } @@ -258,7 +256,8 @@ static WINE_PLAYSOUND* PlaySound_Alloc(const void* pszSound, HMODULE hmod, return wps; oom_error: - PlaySound_Free(wps); + if (wps->bAlloc) HeapFree(GetProcessHeap(), 0, (void*)wps->pszSound); + HeapFree(GetProcessHeap(), 0, wps); return NULL; } @@ -377,6 +376,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) (LPSTR)&mmckInfo.ckid, mmckInfo.fccType, mmckInfo.cksize); lpWaveFormat = HeapAlloc(GetProcessHeap(), 0, mmckInfo.cksize); + if (!lpWaveFormat) + goto errCleanUp; if (mmioRead(hmmio, (HPSTR)lpWaveFormat, mmckInfo.cksize) < sizeof(PCMWAVEFORMAT)) goto errCleanUp; @@ -398,6 +399,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) (LPSTR)&mmckInfo.ckid, mmckInfo.fccType, mmckInfo.cksize); s.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!s.hEvent) + goto errCleanUp; if (waveOutOpen(&hWave, WAVE_MAPPER, lpWaveFormat, (DWORD_PTR)PlaySound_Callback, (DWORD_PTR)&s, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) @@ -407,6 +410,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) bufsize = (((lpWaveFormat->nAvgBytesPerSec / 3) - 1) / lpWaveFormat->nBlockAlign + 1) * lpWaveFormat->nBlockAlign; waveHdr = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(WAVEHDR) + 2 * bufsize); + if (!waveHdr) + goto errCleanUp; waveHdr[0].lpData = (char*)waveHdr + 2 * sizeof(WAVEHDR); waveHdr[1].lpData = (char*)waveHdr + 2 * sizeof(WAVEHDR) + bufsize; waveHdr[0].dwUser = waveHdr[1].dwUser = 0L; @@ -458,10 +463,10 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) errCleanUp: TRACE("Done playing=%s => %s!\n", debugstr_w(wps->pszSound), bRet ? "ok" : "ko"); - CloseHandle(s.hEvent); - HeapFree(GetProcessHeap(), 0, waveHdr); HeapFree(GetProcessHeap(), 0, lpWaveFormat); if (hWave) while (waveOutClose(hWave) == WAVERR_STILLPLAYING) Sleep(100); + CloseHandle(s.hEvent); + HeapFree(GetProcessHeap(), 0, waveHdr); if (hmmio) mmioClose(hmmio, 0); PlaySound_Free(wps); @@ -509,16 +514,15 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo PlaySoundList = wps; LeaveCriticalSection(&WINMM_cs); - if (!pszSound || (fdwSound & SND_PURGE)) return TRUE; + if (!wps) return TRUE; if (fdwSound & SND_ASYNC) { - DWORD id; HANDLE handle; wps->bLoop = (fdwSound & SND_LOOP) ? TRUE : FALSE; - if ((handle = CreateThread(NULL, 0, proc_PlaySound, wps, 0, &id)) != 0) { - wps->hThread = handle; + if ((handle = CreateThread(NULL, 0, proc_PlaySound, wps, 0, NULL)) != 0) { SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); + CloseHandle(handle); return TRUE; } }
1
0
0
0
Jörg Höhle : winmm: Get rid of psStopEvent which was never used like an event.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: a0dbd846c6cf111d20718170e9de2f7681d8fadf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0dbd846c6cf111d20718170e…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sat Mar 26 12:36:49 2011 +0100 winmm: Get rid of psStopEvent which was never used like an event. --- dlls/winmm/playsound.c | 7 ++++--- dlls/winmm/winmm.c | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index a6a3c87..3624124 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -49,6 +49,7 @@ typedef struct tagWINE_PLAYSOUND } WINE_PLAYSOUND; static WINE_PLAYSOUND *PlaySoundList; +static BOOL bPlaySoundStop; static HMMIO get_mmioFromFile(LPCWSTR lpszName) { @@ -426,7 +427,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) mmioSeek(hmmio, mmckInfo.dwDataOffset, SEEK_SET); while (left) { - if (WaitForSingleObject(psStopEvent, 0) == WAIT_OBJECT_0) + if (bPlaySoundStop) { waveOutReset(hWave); wps->bLoop = FALSE; @@ -495,13 +496,13 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo ResetEvent(psLastEvent); /* FIXME: doc says we have to stop all instances of pszSound if it's non * NULL... as of today, we stop all playing instances */ - SetEvent(psStopEvent); + bPlaySoundStop = TRUE; LeaveCriticalSection(&WINMM_cs); WaitForSingleObject(psLastEvent, INFINITE); EnterCriticalSection(&WINMM_cs); - ResetEvent(psStopEvent); + bPlaySoundStop = FALSE; } if (wps) wps->lpNext = PlaySoundList; diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index 029a1c9..6d5950b 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -63,7 +63,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(winmm); HINSTANCE hWinMM32Instance; HANDLE psLastEvent; -HANDLE psStopEvent; static CRITICAL_SECTION_DEBUG critsect_debug = { @@ -79,7 +78,6 @@ CRITICAL_SECTION WINMM_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; static BOOL WINMM_CreateIData(HINSTANCE hInstDLL) { hWinMM32Instance = hInstDLL; - psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL); psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL); return TRUE; } @@ -93,7 +91,6 @@ static void WINMM_DeleteIData(void) /* FIXME: should also free content and resources allocated * inside WINMM_IData */ - CloseHandle(psStopEvent); CloseHandle(psLastEvent); DeleteCriticalSection(&WINMM_cs); }
1
0
0
0
Jörg Höhle : winmm: Abort PlaySound in case of audio error.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: ca37dbcfe6309fd7caad1f53f3b76773cd0278fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca37dbcfe6309fd7caad1f53f…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sat Mar 26 07:36:47 2011 +0100 winmm: Abort PlaySound in case of audio error. --- dlls/winmm/playsound.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 58c833a..a6a3c87 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -179,7 +179,6 @@ static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg, static void PlaySound_WaitDone(struct playsound_data* s) { for (;;) { - ResetEvent(s->hEvent); if (InterlockedDecrement(&s->dwEventCount) >= 0) break; InterlockedIncrement(&s->dwEventCount); @@ -437,17 +436,20 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) if (count < 1) break; left -= count; waveHdr[index].dwBufferLength = count; - waveHdr[index].dwFlags &= ~WHDR_DONE; if (waveOutWrite(hWave, &waveHdr[index], sizeof(WAVEHDR)) == MMSYSERR_NOERROR) { index ^= 1; PlaySound_WaitDone(&s); } - else FIXME("Couldn't play header\n"); + else { + ERR("Aborting play loop, waveOutWrite error\n"); + wps->bLoop = FALSE; + break; + } } bRet = TRUE; } while (wps->bLoop); - PlaySound_WaitDone(&s); /* for last buffer */ + PlaySound_WaitDone(&s); /* to balance first buffer */ waveOutReset(hWave); waveOutUnprepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR));
1
0
0
0
Jörg Höhle : Revert "winmm: Fix PlaySound so it doesn't block when another sound is already playing.".
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 15ad749eced53e0c33454970bfc2bdb58b64f92b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=15ad749eced53e0c33454970b…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sat Mar 26 07:44:22 2011 +0100 Revert "winmm: Fix PlaySound so it doesn't block when another sound is already playing.". This reverts commit f44bc89bc41b2b8d75eeb4fc02f5aa587d84c13c. Let the player thread call waveOutReset itself instead. --- dlls/winmm/playsound.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index f6416ed..58c833a 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -45,7 +45,6 @@ typedef struct tagWINE_PLAYSOUND HMODULE hMod; DWORD fdwSound; HANDLE hThread; - HWAVEOUT hWave; struct tagWINE_PLAYSOUND* lpNext; } WINE_PLAYSOUND; @@ -271,6 +270,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) MMCKINFO ckMainRIFF; MMCKINFO mmckInfo; LPWAVEFORMATEX lpWaveFormat = NULL; + HWAVEOUT hWave = 0; LPWAVEHDR waveHdr = NULL; INT count, bufsize, left, index; struct playsound_data s; @@ -399,7 +399,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) s.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if (waveOutOpen(&wps->hWave, WAVE_MAPPER, lpWaveFormat, (DWORD_PTR)PlaySound_Callback, + if (waveOutOpen(&hWave, WAVE_MAPPER, lpWaveFormat, (DWORD_PTR)PlaySound_Callback, (DWORD_PTR)&s, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) goto errCleanUp; @@ -413,8 +413,8 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) waveHdr[0].dwLoops = waveHdr[1].dwLoops = 0L; waveHdr[0].dwFlags = waveHdr[1].dwFlags = 0L; waveHdr[0].dwBufferLength = waveHdr[1].dwBufferLength = bufsize; - if (waveOutPrepareHeader(wps->hWave, &waveHdr[0], sizeof(WAVEHDR)) || - waveOutPrepareHeader(wps->hWave, &waveHdr[1], sizeof(WAVEHDR))) { + if (waveOutPrepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)) || + waveOutPrepareHeader(hWave, &waveHdr[1], sizeof(WAVEHDR))) { goto errCleanUp; } @@ -429,6 +429,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) { if (WaitForSingleObject(psStopEvent, 0) == WAIT_OBJECT_0) { + waveOutReset(hWave); wps->bLoop = FALSE; break; } @@ -437,7 +438,7 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) left -= count; waveHdr[index].dwBufferLength = count; waveHdr[index].dwFlags &= ~WHDR_DONE; - if (waveOutWrite(wps->hWave, &waveHdr[index], sizeof(WAVEHDR)) == MMSYSERR_NOERROR) { + if (waveOutWrite(hWave, &waveHdr[index], sizeof(WAVEHDR)) == MMSYSERR_NOERROR) { index ^= 1; PlaySound_WaitDone(&s); } @@ -447,17 +448,17 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg) } while (wps->bLoop); PlaySound_WaitDone(&s); /* for last buffer */ - waveOutReset(wps->hWave); + waveOutReset(hWave); - waveOutUnprepareHeader(wps->hWave, &waveHdr[0], sizeof(WAVEHDR)); - waveOutUnprepareHeader(wps->hWave, &waveHdr[1], sizeof(WAVEHDR)); + waveOutUnprepareHeader(hWave, &waveHdr[0], sizeof(WAVEHDR)); + waveOutUnprepareHeader(hWave, &waveHdr[1], sizeof(WAVEHDR)); errCleanUp: TRACE("Done playing=%s => %s!\n", debugstr_w(wps->pszSound), bRet ? "ok" : "ko"); CloseHandle(s.hEvent); HeapFree(GetProcessHeap(), 0, waveHdr); HeapFree(GetProcessHeap(), 0, lpWaveFormat); - if (wps->hWave) while (waveOutClose(wps->hWave) == WAVERR_STILLPLAYING) Sleep(100); + if (hWave) while (waveOutClose(hWave) == WAVERR_STILLPLAYING) Sleep(100); if (hmmio) mmioClose(hmmio, 0); PlaySound_Free(wps); @@ -494,7 +495,6 @@ static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSo * NULL... as of today, we stop all playing instances */ SetEvent(psStopEvent); - waveOutReset(PlaySoundList->hWave); LeaveCriticalSection(&WINMM_cs); WaitForSingleObject(psLastEvent, INFINITE); EnterCriticalSection(&WINMM_cs);
1
0
0
0
Alexandre Julliard : user32: Reset the cursor clip rectangle before moving a window.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 2f368cfad284014396813533821754acf8e4bc70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f368cfad2840143968135338…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 30 12:34:45 2011 +0200 user32: Reset the cursor clip rectangle before moving a window. --- dlls/user32/winpos.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index a8324e8..789238f 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2491,6 +2491,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) pt.x = (short)LOWORD(dwPoint); pt.y = (short)HIWORD(dwPoint); capturePoint = pt; + ClipCursor( NULL ); TRACE("hwnd %p command %04lx, hittest %d, pos %d,%d\n", hwnd, syscommand, hittest, pt.x, pt.y);
1
0
0
0
Alexandre Julliard : server: Reset the cursor clip rectangle when the foreground thread changes.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 2b96875b6af708895006570b74b6254d7ac9b34e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b96875b6af708895006570b7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 30 12:34:32 2011 +0200 server: Reset the cursor clip rectangle when the foreground thread changes. --- server/queue.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/server/queue.c b/server/queue.c index 7d25afa..2e1168d 100644 --- a/server/queue.c +++ b/server/queue.c @@ -318,6 +318,14 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_ return 1; } +/* change the foreground input and reset the cursor clip rect */ +static void set_foreground_input( struct desktop *desktop, struct thread_input *input ) +{ + if (desktop->foreground_input == input) return; + get_top_window_rectangle( desktop, &desktop->cursor_clip ); + desktop->foreground_input = input; +} + /* get the hook table for a given thread */ struct hook_table *get_queue_hooks( struct thread *thread ) { @@ -901,7 +909,7 @@ static void thread_input_destroy( struct object *obj ) empty_msg_list( &input->msg_list ); if (input->desktop) { - if (input->desktop->foreground_input == input) input->desktop->foreground_input = NULL; + if (input->desktop->foreground_input == input) set_foreground_input( input->desktop, NULL ); release_object( input->desktop ); } } @@ -2445,7 +2453,7 @@ DECL_HANDLER(set_foreground_window) ((thread = get_window_thread( req->handle ))) && (thread->queue->input->desktop == desktop)) { - desktop->foreground_input = thread->queue->input; + set_foreground_input( desktop, thread->queue->input ); reply->send_msg_new = (desktop->foreground_input != queue->input); } else set_win32_error( ERROR_INVALID_WINDOW_HANDLE );
1
0
0
0
Matteo Bruni : winex11.drv: Make wglMakeCurrent return the correct error when the drawable is invalid.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 716df1c2d246a35f11622044d2816260ba2ffdef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=716df1c2d246a35f11622044d…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Mar 17 22:49:23 2011 +0100 winex11.drv: Make wglMakeCurrent return the correct error when the drawable is invalid. --- dlls/opengl32/tests/opengl.c | 6 +++--- dlls/winex11.drv/opengl.c | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 8c81ba2..9834c6d 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -956,7 +956,7 @@ static void test_destroy(HDC oldhdc) SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); err = GetLastError(); - todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); ok(wglGetCurrentContext() == ctx, "Wrong current context.\n"); @@ -977,7 +977,7 @@ static void test_destroy(HDC oldhdc) SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); err = GetLastError(); - todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); ok(wglGetCurrentContext() == NULL, "Wrong current context.\n"); @@ -989,7 +989,7 @@ static void test_destroy(HDC oldhdc) SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); err = GetLastError(); - todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index c5796a4..0a23e44 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1896,6 +1896,12 @@ BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) { ret = pglXMakeCurrent(gdi_display, None, NULL); NtCurrentTeb()->glContext = NULL; } + else if (!physDev->current_pf) + { + WARN("Trying to use an invalid drawable\n"); + SetLastError(ERROR_INVALID_HANDLE); + ret = FALSE; + } else if (ctx->fmt->iPixelFormat != physDev->current_pf) { WARN( "mismatched pixel format hdc %p %u ctx %p %u\n",
1
0
0
0
Matteo Bruni : winex11.drv: Don' t modify current state if glXMakeCurrent fails.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 77679c4e9cde852b366d1039fb30b4e7995b44c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77679c4e9cde852b366d1039f…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Mar 3 21:06:33 2011 +0100 winex11.drv: Don't modify current state if glXMakeCurrent fails. --- dlls/winex11.drv/opengl.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index b74bc0a..c5796a4 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1907,7 +1907,6 @@ BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) { { Drawable drawable = get_glxdrawable(physDev); Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; - if (prev_ctx) prev_ctx->tid = 0; /* The describe lines below are for debugging purposes only */ if (TRACE_ON(wgl)) { @@ -1917,10 +1916,12 @@ BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) { TRACE(" make current for dis %p, drawable %p, ctx %p\n", gdi_display, (void*) drawable, ctx->ctx); ret = pglXMakeCurrent(gdi_display, drawable, ctx->ctx); - NtCurrentTeb()->glContext = ctx; - if(ret) + if (ret) { + if (prev_ctx) prev_ctx->tid = 0; + NtCurrentTeb()->glContext = ctx; + ctx->has_been_current = TRUE; ctx->tid = GetCurrentThreadId(); ctx->hdc = hdc; @@ -1935,6 +1936,8 @@ BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) { pglDrawBuffer(GL_FRONT_LEFT); } } + else + SetLastError(ERROR_INVALID_HANDLE); } wine_tsx11_unlock(); TRACE(" returning %s\n", (ret ? "True" : "False"));
1
0
0
0
Matteo Bruni : opengl32/tests: Test using a GL context after the drawable is destroyed.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 6af0bef46af83284249ef12e2a1770041bc7f755 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6af0bef46af83284249ef12e2…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 2 22:25:46 2011 +0100 opengl32/tests: Test using a GL context after the drawable is destroyed. --- dlls/opengl32/tests/opengl.c | 124 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 124 insertions(+), 0 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 65df28b..8c81ba2 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -25,6 +25,10 @@ void WINAPI glClearColor(float red, float green, float blue, float alpha); void WINAPI glClear(unsigned int mask); void WINAPI glFinish(void); +typedef unsigned int GLenum; +#define GL_NO_ERROR 0x0 +#define GL_INVALID_OPERATION 0x502 +GLenum WINAPI glGetError(void); #define GL_COLOR_BUFFER_BIT 0x00004000 const unsigned char * WINAPI glGetString(unsigned int); #define GL_VENDOR 0x1F00 @@ -386,6 +390,8 @@ static void test_makecurrent(HDC winhdc) ret = wglMakeCurrent( NULL, NULL ); ok( ret, "wglMakeCurrent failed\n" ); + ok( wglGetCurrentContext() == NULL, "wrong context\n" ); + SetLastError( 0xdeadbeef ); ret = wglMakeCurrent( NULL, NULL ); ok( !ret, "wglMakeCurrent succeeded\n" ); @@ -880,6 +886,123 @@ static void test_minimized(void) DestroyWindow(window); } +static void test_destroy(HDC oldhdc) +{ + PIXELFORMATDESCRIPTOR pf_desc = + { + sizeof(PIXELFORMATDESCRIPTOR), + 1, /* version */ + PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, + PFD_TYPE_RGBA, + 24, /* 24-bit color depth */ + 0, 0, 0, 0, 0, 0, /* color bits */ + 0, /* alpha buffer */ + 0, /* shift bit */ + 0, /* accumulation buffer */ + 0, 0, 0, 0, /* accum bits */ + 32, /* z-buffer */ + 0, /* stencil buffer */ + 0, /* auxiliary buffer */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0 /* layer masks */ + }; + int pixel_format; + HWND window; + HGLRC ctx; + BOOL ret; + HDC dc; + GLenum glerr; + DWORD err; + HGLRC oldctx = wglGetCurrentContext(); + + ok(!!oldctx, "Expected to find a valid current context.\n"); + + window = CreateWindowA("static", "opengl32_test", + WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); + ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); + + dc = GetDC(window); + ok(!!dc, "Failed to get DC.\n"); + + pixel_format = ChoosePixelFormat(dc, &pf_desc); + if (!pixel_format) + { + win_skip("Failed to find pixel format.\n"); + ReleaseDC(window, dc); + DestroyWindow(window); + return; + } + + ret = SetPixelFormat(dc, pixel_format, &pf_desc); + ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + + ctx = wglCreateContext(dc); + ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + + ret = wglMakeCurrent(dc, ctx); + ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + glerr = glGetError(); + ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + + ret = DestroyWindow(window); + ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + + ok(wglGetCurrentContext() == ctx, "Wrong current context.\n"); + + SetLastError(0xdeadbeef); + ret = wglMakeCurrent(dc, ctx); + err = GetLastError(); + todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + + ok(wglGetCurrentContext() == ctx, "Wrong current context.\n"); + + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + glerr = glGetError(); + ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + + ret = wglMakeCurrent(NULL, NULL); + ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + glerr = glGetError(); + todo_wine ok(glerr == GL_INVALID_OPERATION, "Failed glClear, error %#x.\n", glerr); + + SetLastError(0xdeadbeef); + ret = wglMakeCurrent(dc, ctx); + err = GetLastError(); + todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + + ok(wglGetCurrentContext() == NULL, "Wrong current context.\n"); + + ret = wglMakeCurrent(oldhdc, oldctx); + ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); + + SetLastError(0xdeadbeef); + ret = wglMakeCurrent(dc, ctx); + err = GetLastError(); + todo_wine ok(!ret && err == ERROR_INVALID_HANDLE, + "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + + ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); + + ret = wglDeleteContext(ctx); + ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + + ReleaseDC(window, dc); + + ret = wglMakeCurrent(oldhdc, oldctx); + ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); +} + START_TEST(opengl) { HWND hwnd; @@ -967,6 +1090,7 @@ START_TEST(opengl) test_deletecontext(hdc); test_makecurrent(hdc); test_setpixelformat(hdc); + test_destroy(hdc); test_sharelists(hdc); test_colorbits(hdc); test_gdi_dbuf(hdc);
1
0
0
0
Vincent Povirk : gdiplus: Fall back to Liberation Serif if Times New Roman is missing.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: ca5b5d2a05677b180f6dc5346fef5d2cf501bcdb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca5b5d2a05677b180f6dc5346…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Mar 29 13:11:53 2011 -0500 gdiplus: Fall back to Liberation Serif if Times New Roman is missing. --- dlls/gdiplus/font.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index e092b43..54accd7 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -837,12 +837,22 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamil GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily) { static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'}; + static const WCHAR LiberationSerif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f','\0'}; + GpStatus stat; TRACE("(%p)\n", nativeFamily); if (nativeFamily == NULL) return InvalidParameter; - return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily); + stat = GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily); + + if (stat == FontFamilyNotFound) + stat = GdipCreateFontFamilyFromName(LiberationSerif, NULL, nativeFamily); + + if (stat == FontFamilyNotFound) + ERR("Missing 'Times New Roman' font\n"); + + return stat; } /*****************************************************************************
1
0
0
0
David Hedberg : comdlg32: Implement Advise/Unadvise for the Item Dialog.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: ac2063a418d5c198333188bd5e7e3c050037d838 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac2063a418d5c198333188bd5…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Mar 29 21:13:23 2011 +0200 comdlg32: Implement Advise/Unadvise for the Item Dialog. --- dlls/comdlg32/itemdlg.c | 54 ++++++++++- dlls/comdlg32/tests/itemdlg.c | 201 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 251 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ac2063a418d5c19833318…
1
0
0
0
David Hedberg : comdlg32: Implement some folder and file selection functions for the Item Dialog.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: b5a1c89f6ad056c8b7437186ba4a16c310f97bfa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5a1c89f6ad056c8b7437186b…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Mar 29 21:13:22 2011 +0200 comdlg32: Implement some folder and file selection functions for the Item Dialog. --- dlls/comdlg32/itemdlg.c | 136 ++++++++++++++++++++++++++++++++++++---- dlls/comdlg32/tests/itemdlg.c | 23 ++----- 2 files changed, 129 insertions(+), 30 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 018e713..4cb6839 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -56,6 +56,12 @@ typedef struct FileDialogImpl { COMDLG_FILTERSPEC *filterspecs; UINT filterspec_count; UINT filetypeindex; + + IShellItemArray *psia_selection; + IShellItemArray *psia_results; + IShellItem *psi_defaultfolder; + IShellItem *psi_setfolder; + IShellItem *psi_folder; } FileDialogImpl; /************************************************************************** @@ -125,6 +131,12 @@ static ULONG WINAPI IFileDialog2_fnRelease(IFileDialog2 *iface) } HeapFree(GetProcessHeap(), 0, This->filterspecs); + if(This->psi_defaultfolder) IShellItem_Release(This->psi_defaultfolder); + if(This->psi_setfolder) IShellItem_Release(This->psi_setfolder); + if(This->psi_folder) IShellItem_Release(This->psi_folder); + if(This->psia_selection) IShellItemArray_Release(This->psia_selection); + if(This->psia_results) IShellItemArray_Release(This->psia_results); + HeapFree(GetProcessHeap(), 0, This); } @@ -234,29 +246,77 @@ static HRESULT WINAPI IFileDialog2_fnGetOptions(IFileDialog2 *iface, FILEOPENDIA static HRESULT WINAPI IFileDialog2_fnSetDefaultFolder(IFileDialog2 *iface, IShellItem *psi) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, psi); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, psi); + if(This->psi_defaultfolder) + IShellItem_Release(This->psi_defaultfolder); + + This->psi_defaultfolder = psi; + + if(This->psi_defaultfolder) + IShellItem_AddRef(This->psi_defaultfolder); + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnSetFolder(IFileDialog2 *iface, IShellItem *psi) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, psi); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, psi); + if(This->psi_setfolder) + IShellItem_Release(This->psi_setfolder); + + This->psi_setfolder = psi; + + if(This->psi_setfolder) + IShellItem_AddRef(This->psi_setfolder); + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnGetFolder(IFileDialog2 *iface, IShellItem **ppsi) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, ppsi); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, ppsi); + if(!ppsi) + return E_INVALIDARG; + + /* FIXME: + If the dialog is shown, return the current(ly selected) folder. */ + + *ppsi = NULL; + if(This->psi_folder) + *ppsi = This->psi_folder; + else if(This->psi_setfolder) + *ppsi = This->psi_setfolder; + else if(This->psi_defaultfolder) + *ppsi = This->psi_defaultfolder; + + if(*ppsi) + { + IShellItem_AddRef(*ppsi); + return S_OK; + } + + return E_FAIL; } static HRESULT WINAPI IFileDialog2_fnGetCurrentSelection(IFileDialog2 *iface, IShellItem **ppsi) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, ppsi); - return E_NOTIMPL; + HRESULT hr; + TRACE("%p (%p)\n", This, ppsi); + + if(!ppsi) + return E_INVALIDARG; + + if(This->psia_selection) + { + /* FIXME: Check filename edit box */ + hr = IShellItemArray_GetItemAt(This->psia_selection, 0, ppsi); + return hr; + } + + return E_FAIL; } static HRESULT WINAPI IFileDialog2_fnSetFileName(IFileDialog2 *iface, LPCWSTR pszName) @@ -297,8 +357,29 @@ static HRESULT WINAPI IFileDialog2_fnSetFileNameLabel(IFileDialog2 *iface, LPCWS static HRESULT WINAPI IFileDialog2_fnGetResult(IFileDialog2 *iface, IShellItem **ppsi) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, ppsi); - return E_NOTIMPL; + HRESULT hr; + TRACE("%p (%p)\n", This, ppsi); + + if(!ppsi) + return E_INVALIDARG; + + if(This->psia_results) + { + UINT item_count; + hr = IShellItemArray_GetCount(This->psia_results, &item_count); + if(SUCCEEDED(hr)) + { + if(item_count != 1) + return E_FAIL; + + /* Adds a reference. */ + hr = IShellItemArray_GetItemAt(This->psia_results, 0, ppsi); + } + + return hr; + } + + return E_UNEXPECTED; } static HRESULT WINAPI IFileDialog2_fnAddPlace(IFileDialog2 *iface, IShellItem *psi, FDAP fdap) @@ -566,15 +647,32 @@ static HRESULT WINAPI IFileOpenDialog_fnSetFilter(IFileOpenDialog *iface, IShell static HRESULT WINAPI IFileOpenDialog_fnGetResults(IFileOpenDialog *iface, IShellItemArray **ppenum) { FileDialogImpl *This = impl_from_IFileOpenDialog(iface); - FIXME("stub - %p (%p)\n", This, ppenum); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, ppenum); + + *ppenum = This->psia_results; + + if(*ppenum) + { + IShellItemArray_AddRef(*ppenum); + return S_OK; + } + + return E_FAIL; } static HRESULT WINAPI IFileOpenDialog_fnGetSelectedItems(IFileOpenDialog *iface, IShellItemArray **ppsai) { FileDialogImpl *This = impl_from_IFileOpenDialog(iface); - FIXME("stub - %p (%p)\n", This, ppsai); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, ppsai); + + if(This->psia_selection) + { + *ppsai = This->psia_selection; + IShellItemArray_AddRef(*ppsai); + return S_OK; + } + + return E_FAIL; } static const IFileOpenDialogVtbl vt_IFileOpenDialog = { @@ -864,6 +962,7 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p { FileDialogImpl *fdimpl; HRESULT hr; + IShellFolder *psf; TRACE("%p, %s, %p\n", pUnkOuter, debugstr_guid(riid), ppv); if(!ppv) @@ -895,6 +994,15 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p fdimpl->filterspec_count = 0; fdimpl->filetypeindex = 0; + fdimpl->psia_selection = fdimpl->psia_results = NULL; + fdimpl->psi_setfolder = fdimpl->psi_folder = NULL; + + /* FIXME: The default folder setting should be restored for the + * application if it was previously set. */ + SHGetDesktopFolder(&psf); + SHGetItemFromObject((IUnknown*)psf, &IID_IShellItem, (void**)&fdimpl->psi_defaultfolder); + IShellFolder_Release(psf); + hr = IUnknown_QueryInterface((IUnknown*)fdimpl, riid, ppv); IUnknown_Release((IUnknown*)fdimpl); return hr; diff --git a/dlls/comdlg32/tests/itemdlg.c b/dlls/comdlg32/tests/itemdlg.c index 848d815..e5f5439 100644 --- a/dlls/comdlg32/tests/itemdlg.c +++ b/dlls/comdlg32/tests/itemdlg.c @@ -223,21 +223,18 @@ static void test_basics(void) "Unexpected default options: 0x%08x\n", fdoptions); /* GetResult */ - todo_wine - { hr = IFileOpenDialog_GetResult(pfod, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); hr = IFileSaveDialog_GetResult(pfsd, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); - } psi = (void*)0xdeadbeef; hr = IFileOpenDialog_GetResult(pfod, &psi); - todo_wine ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); ok(psi == (void*)0xdeadbeef, "got %p.\n", psi); psi = (void*)0xdeadbeef; hr = IFileSaveDialog_GetResult(pfsd, &psi); - todo_wine ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); + ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); ok(psi == (void*)0xdeadbeef, "got %p.\n", psi); /* GetCurrentSelection */ @@ -336,13 +333,10 @@ static void test_basics(void) } /* SetFolder */ - todo_wine - { hr = IFileOpenDialog_SetFolder(pfod, NULL); ok(hr == S_OK, "got 0x%08x.\n", hr); hr = IFileSaveDialog_SetFolder(pfsd, NULL); ok(hr == S_OK, "got 0x%08x.\n", hr); - } /* SetDefaultExtension */ todo_wine @@ -363,8 +357,6 @@ static void test_basics(void) } /* SetDefaultFolder */ - todo_wine - { hr = IFileOpenDialog_SetDefaultFolder(pfod, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IFileSaveDialog_SetDefaultFolder(pfsd, NULL); @@ -374,7 +366,6 @@ static void test_basics(void) ok(hr == S_OK, "got 0x%08x\n", hr); hr = IFileSaveDialog_SetDefaultFolder(pfsd, psidesktop); ok(hr == S_OK, "got 0x%08x\n", hr); - } if(0) { @@ -385,10 +376,10 @@ static void test_basics(void) /* GetFolder / SetFolder */ hr = IFileOpenDialog_GetFolder(pfod, NULL); - todo_wine ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); hr = IFileOpenDialog_GetFolder(pfod, &psi_original); - todo_wine ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08x.\n", hr); if(SUCCEEDED(hr)) { hr = IFileOpenDialog_SetFolder(pfod, psidesktop); @@ -399,7 +390,7 @@ static void test_basics(void) } hr = IFileSaveDialog_GetFolder(pfsd, &psi_original); - todo_wine ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08x.\n", hr); if(SUCCEEDED(hr)) { hr = IFileSaveDialog_SetFolder(pfsd, psidesktop); @@ -523,8 +514,8 @@ static void test_basics(void) } psia = (void*)0xdeadbeef; hr = IFileOpenDialog_GetResults(pfod, &psia); - todo_wine ok(hr == E_FAIL, "got 0x%08x.\n", hr); - todo_wine ok(psia == NULL, "got %p.\n", psia); + ok(hr == E_FAIL, "got 0x%08x.\n", hr); + ok(psia == NULL, "got %p.\n", psia); /* GetSelectedItems */ if(0)
1
0
0
0
David Hedberg : comdlg32: Implement SetFileTypes and GetFileTypeIndex/ SetFileTypeIndex for the Item Dialog.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: fc771c9f3872133227bdf043e93d465624a0d687 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc771c9f3872133227bdf043e…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Wed Mar 30 08:12:29 2011 +0200 comdlg32: Implement SetFileTypes and GetFileTypeIndex/SetFileTypeIndex for the Item Dialog. --- dlls/comdlg32/itemdlg.c | 65 +++++++++++++++++++++++++++++++++++++---- dlls/comdlg32/tests/itemdlg.c | 6 ---- 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 27f57cd..018e713 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -28,6 +28,8 @@ #include "winbase.h" #include "winuser.h" #include "wingdi.h" +#include "winreg.h" +#include "shlwapi.h" #include "commdlg.h" #include "cdlg.h" @@ -51,6 +53,9 @@ typedef struct FileDialogImpl { LONG ref; FILEOPENDIALOGOPTIONS options; + COMDLG_FILTERSPEC *filterspecs; + UINT filterspec_count; + UINT filetypeindex; } FileDialogImpl; /************************************************************************** @@ -111,7 +116,17 @@ static ULONG WINAPI IFileDialog2_fnRelease(IFileDialog2 *iface) TRACE("%p - ref %d\n", This, ref); if(!ref) + { + UINT i; + for(i = 0; i < This->filterspec_count; i++) + { + LocalFree((void*)This->filterspecs[i].pszName); + LocalFree((void*)This->filterspecs[i].pszSpec); + } + HeapFree(GetProcessHeap(), 0, This->filterspecs); + HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -127,22 +142,56 @@ static HRESULT WINAPI IFileDialog2_fnSetFileTypes(IFileDialog2 *iface, UINT cFil const COMDLG_FILTERSPEC *rgFilterSpec) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%d, %p)\n", This, cFileTypes, rgFilterSpec); - return E_NOTIMPL; + UINT i; + TRACE("%p (%d, %p)\n", This, cFileTypes, rgFilterSpec); + + if(This->filterspecs) + return E_UNEXPECTED; + + if(!rgFilterSpec) + return E_INVALIDARG; + + if(!cFileTypes) + return S_OK; + + This->filterspecs = HeapAlloc(GetProcessHeap(), 0, sizeof(COMDLG_FILTERSPEC)*cFileTypes); + for(i = 0; i < cFileTypes; i++) + { + This->filterspecs[i].pszName = StrDupW(rgFilterSpec[i].pszName); + This->filterspecs[i].pszSpec = StrDupW(rgFilterSpec[i].pszSpec); + } + This->filterspec_count = cFileTypes; + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnSetFileTypeIndex(IFileDialog2 *iface, UINT iFileType) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%d)\n", This, iFileType); - return E_NOTIMPL; + TRACE("%p (%d)\n", This, iFileType); + + if(!This->filterspecs) + return E_FAIL; + + if(iFileType >= This->filterspec_count) + This->filetypeindex = This->filterspec_count - 1; + else + This->filetypeindex = iFileType; + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnGetFileTypeIndex(IFileDialog2 *iface, UINT *piFileType) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (%p)\n", This, piFileType); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, piFileType); + + if(!piFileType) + return E_INVALIDARG; + + *piFileType = This->filetypeindex; + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnAdvise(IFileDialog2 *iface, IFileDialogEvents *pfde, DWORD *pdwCookie) @@ -842,6 +891,10 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p fdimpl->options = FOS_OVERWRITEPROMPT | FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR; } + fdimpl->filterspecs = NULL; + fdimpl->filterspec_count = 0; + fdimpl->filetypeindex = 0; + hr = IUnknown_QueryInterface((IUnknown*)fdimpl, riid, ppv); IUnknown_Release((IUnknown*)fdimpl); return hr; diff --git a/dlls/comdlg32/tests/itemdlg.c b/dlls/comdlg32/tests/itemdlg.c index f67ef31..848d815 100644 --- a/dlls/comdlg32/tests/itemdlg.c +++ b/dlls/comdlg32/tests/itemdlg.c @@ -271,8 +271,6 @@ static void test_basics(void) } /* GetFileTypeIndex */ - todo_wine - { hr = IFileOpenDialog_GetFileTypeIndex(pfod, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); filetype = 0x12345; @@ -285,11 +283,8 @@ static void test_basics(void) hr = IFileSaveDialog_GetFileTypeIndex(pfsd, &filetype); ok(hr == S_OK, "got 0x%08x.\n", hr); ok(filetype == 0, "got %d.\n", filetype); - } /* SetFileTypes / SetFileTypeIndex */ - todo_wine - { hr = IFileOpenDialog_SetFileTypes(pfod, 0, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); hr = IFileOpenDialog_SetFileTypes(pfod, 0, filterspec); @@ -330,7 +325,6 @@ static void test_basics(void) ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); hr = IFileSaveDialog_SetFileTypes(pfsd, 1, &filterspec[1]); ok(hr == E_UNEXPECTED, "got 0x%08x.\n", hr); - } /* SetFilter */ todo_wine
1
0
0
0
David Hedberg : comdlg32: Implement SetOptions/ GetOptions for the Item Dialog.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: f9a95150f3cc3a6c3c1aa3f7bfa9d0726c594955 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9a95150f3cc3a6c3c1aa3f7b…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Mar 29 21:13:20 2011 +0200 comdlg32: Implement SetOptions/GetOptions for the Item Dialog. --- dlls/comdlg32/itemdlg.c | 21 +++++++++++++++++---- dlls/comdlg32/tests/itemdlg.c | 6 ------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 4e49081..27f57cd 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -49,6 +49,8 @@ typedef struct FileDialogImpl { } u; enum ITEMDLG_TYPE dlg_type; LONG ref; + + FILEOPENDIALOGOPTIONS options; } FileDialogImpl; /************************************************************************** @@ -160,15 +162,24 @@ static HRESULT WINAPI IFileDialog2_fnUnadvise(IFileDialog2 *iface, DWORD dwCooki static HRESULT WINAPI IFileDialog2_fnSetOptions(IFileDialog2 *iface, FILEOPENDIALOGOPTIONS fos) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p (0x%x)\n", This, fos); - return E_NOTIMPL; + TRACE("%p (0x%x)\n", This, fos); + + This->options = fos; + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnGetOptions(IFileDialog2 *iface, FILEOPENDIALOGOPTIONS *pfos) { FileDialogImpl *This = impl_from_IFileDialog2(iface); - FIXME("stub - %p\n", This); - return E_NOTIMPL; + TRACE("%p (%p)\n", This, pfos); + + if(!pfos) + return E_INVALIDARG; + + *pfos = This->options; + + return S_OK; } static HRESULT WINAPI IFileDialog2_fnSetDefaultFolder(IFileDialog2 *iface, IShellItem *psi) @@ -822,11 +833,13 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p { fdimpl->dlg_type = ITEMDLG_TYPE_OPEN; fdimpl->u.IFileOpenDialog_iface.lpVtbl = &vt_IFileOpenDialog; + fdimpl->options = FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_NOCHANGEDIR; } else { fdimpl->dlg_type = ITEMDLG_TYPE_SAVE; fdimpl->u.IFileSaveDialog_iface.lpVtbl = &vt_IFileSaveDialog; + fdimpl->options = FOS_OVERWRITEPROMPT | FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR; } hr = IUnknown_QueryInterface((IUnknown*)fdimpl, riid, ppv); diff --git a/dlls/comdlg32/tests/itemdlg.c b/dlls/comdlg32/tests/itemdlg.c index c345498..f67ef31 100644 --- a/dlls/comdlg32/tests/itemdlg.c +++ b/dlls/comdlg32/tests/itemdlg.c @@ -207,17 +207,12 @@ static void test_basics(void) } /* GetOptions */ - todo_wine - { hr = IFileOpenDialog_GetOptions(pfod, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); hr = IFileSaveDialog_GetOptions(pfsd, NULL); ok(hr == E_INVALIDARG, "got 0x%08x.\n", hr); - } /* Check default options */ - todo_wine - { hr = IFileOpenDialog_GetOptions(pfod, &fdoptions); ok(hr == S_OK, "got 0x%08x.\n", hr); ok(fdoptions == (FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_NOCHANGEDIR), @@ -226,7 +221,6 @@ static void test_basics(void) ok(hr == S_OK, "got 0x%08x.\n", hr); ok(fdoptions == (FOS_OVERWRITEPROMPT | FOS_NOREADONLYRETURN | FOS_PATHMUSTEXIST | FOS_NOCHANGEDIR), "Unexpected default options: 0x%08x\n", fdoptions); - } /* GetResult */ todo_wine
1
0
0
0
David Hedberg : comdlg32/tests: Add initial tests for the Item Dialog.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: fb391afaefb308cbbf0efc7c7911388cbafd77db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb391afaefb308cbbf0efc7c7…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Mar 29 21:13:19 2011 +0200 comdlg32/tests: Add initial tests for the Item Dialog. --- dlls/comdlg32/tests/Makefile.in | 3 +- dlls/comdlg32/tests/filedlg.c | 1 - dlls/comdlg32/tests/itemdlg.c | 672 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 674 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fb391afaefb308cbbf0ef…
1
0
0
0
David Hedberg : comdlg32: Add implementation of DllRegisterServer/ DllUnregisterServer.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 18b1f5ca476a8fc1d87a5615de528d1139045b15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=18b1f5ca476a8fc1d87a5615d…
Author: David Hedberg <david.hedberg(a)gmail.com> Date: Tue Mar 29 21:13:18 2011 +0200 comdlg32: Add implementation of DllRegisterServer/DllUnregisterServer. --- dlls/comdlg32/Makefile.in | 2 ++ dlls/comdlg32/cdlg32.c | 18 ++++++++++++++++++ dlls/comdlg32/comdlg32.spec | 2 ++ dlls/comdlg32/comdlg32_classes.idl | 33 +++++++++++++++++++++++++++++++++ tools/wine.inf.in | 1 + 5 files changed, 56 insertions(+), 0 deletions(-) diff --git a/dlls/comdlg32/Makefile.in b/dlls/comdlg32/Makefile.in index 6bf1c1a..f75c706 100644 --- a/dlls/comdlg32/Makefile.in +++ b/dlls/comdlg32/Makefile.in @@ -57,4 +57,6 @@ SVG_SRCS = \ pd32_nocollate.svg \ pd32_portrait.svg +IDL_R_SRCS = comdlg32_classes.idl + @MAKE_DLL_RULES@ diff --git a/dlls/comdlg32/cdlg32.c b/dlls/comdlg32/cdlg32.c index de0f486..4f6b98a 100644 --- a/dlls/comdlg32/cdlg32.c +++ b/dlls/comdlg32/cdlg32.c @@ -27,6 +27,8 @@ #include "winbase.h" #include "wingdi.h" #include "winuser.h" +#include "objbase.h" +#include "rpcproxy.h" #include "commdlg.h" #include "cderr.h" #include "wine/debug.h" @@ -273,3 +275,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) return CLASS_E_CLASSNOTAVAILABLE; } + +/*********************************************************************** + * DllRegisterServer (COMMDLG32.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources(COMDLG32_hInstance, NULL); +} + +/*********************************************************************** + * DllUnregisterServer (COMMDLG32.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources(COMDLG32_hInstance, NULL); +} diff --git a/dlls/comdlg32/comdlg32.spec b/dlls/comdlg32/comdlg32.spec index 118d3d7..01c7cf6 100644 --- a/dlls/comdlg32/comdlg32.spec +++ b/dlls/comdlg32/comdlg32.spec @@ -4,6 +4,8 @@ @ stdcall ChooseFontW(ptr) @ stdcall CommDlgExtendedError() @ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stdcall FindTextA(ptr) @ stdcall FindTextW(ptr) @ stdcall GetFileTitleA(str ptr long) diff --git a/dlls/comdlg32/comdlg32_classes.idl b/dlls/comdlg32/comdlg32_classes.idl new file mode 100644 index 0000000..b45eeb5 --- /dev/null +++ b/dlls/comdlg32/comdlg32_classes.idl @@ -0,0 +1,33 @@ +/* + * Coclasses for comdlg32 + * + * Copyright 2011 David Hedberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + helpstring("File Open Dialog"), + threading(apartment), + uuid(dc1c5a9c-e88a-4dde-a5a1-60f82a20aef7) +] +coclass FileOpenDialog { interface IFileOpenDialog; } + +[ + helpstring("File Save Dialog"), + threading(apartment), + uuid(c0b4e2f3-ba21-4773-8dba-335ec946eb8b) +] +coclass FileSaveDialog { interface IFileSaveDialog; } diff --git a/tools/wine.inf.in b/tools/wine.inf.in index ff72e56..5c09faf 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2489,6 +2489,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,avifil32.dll,1 11,,browseui.dll,1 11,,comctl32.dll,2 +11,,comdlg32.dll,1 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,d3dxof.dll,1
1
0
0
0
Piotr Caban : ntdll: Don' t call compare function on memory not provided by user in qsort.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 49250bec7c23b79d4bf23fb95e86acb132e4e567 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49250bec7c23b79d4bf23fb95…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Mar 30 10:56:27 2011 +0200 ntdll: Don't call compare function on memory not provided by user in qsort. --- dlls/ntdll/misc.c | 27 +++++++++++---------------- 1 files changed, 11 insertions(+), 16 deletions(-) diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index 8496113..fecd67e 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -253,7 +253,6 @@ double CDECL NTDLL_tan( double d ) } -/* Merge Sort. Algorithm taken from
http://www.linux-related.de/index.html?/coding/sort/sort_merge.htm
*/ static void NTDLL_mergesort( void *arr, void *barr, size_t elemsize, int(__cdecl *compar)(const void *, const void *), size_t left, size_t right ) @@ -265,25 +264,21 @@ NTDLL_mergesort( void *arr, void *barr, size_t elemsize, int(__cdecl *compar)(co NTDLL_mergesort( arr, barr, elemsize, compar, m+1, right); #define X(a,i) ((char*)a+elemsize*(i)) - for (i=m+1; i>left; i--) - memcpy (X(barr,(i-1)),X(arr,(i-1)),elemsize); - for (j=m; j<right; j++) - memcpy (X(barr,(right+m-j)),X(arr,(j+1)),elemsize); - - /* i=left; j=right; */ - for (k=left; i<=m && j>m; k++) { - if (i==j || compar(X(barr,i),X(barr,j))<=0) { - memcpy(X(arr,k),X(barr,i),elemsize); + for (k=left, i=left, j=m+1; i<=m && j<=right; k++) { + if (compar(X(arr, i), X(arr,j)) <= 0) { + memcpy(X(barr,k), X(arr, i), elemsize); i++; } else { - memcpy(X(arr,k),X(barr,j),elemsize); - j--; + memcpy(X(barr,k), X(arr, j), elemsize); + j++; } } - for (; i<=m; i++, k++) - memcpy(X(arr,k),X(barr,i),elemsize); - for (; j>m; j--, k++) - memcpy(X(arr,k),X(barr,j),elemsize); + if (i<=m) + memcpy(X(barr,k), X(arr,i), (m-i+1)*elemsize); + else + memcpy(X(barr,k), X(arr,j), (right-j+1)*elemsize); + + memcpy(X(arr, left), X(barr, left), (right-left+1)*elemsize); } #undef X }
1
0
0
0
Henri Verbeet : wined3d: Get rid of IWineD3DPixelShaderImpl.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 99bed5d41d456b681ab1253ea7844b4030bba40a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99bed5d41d456b681ab1253ea…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 29 19:21:52 2011 +0200 wined3d: Get rid of IWineD3DPixelShaderImpl. --- dlls/wined3d/arb_program_shader.c | 66 ++++++++++++++++++++---------------- dlls/wined3d/device.c | 6 ++-- dlls/wined3d/glsl_shader.c | 68 ++++++++++++++++++------------------ dlls/wined3d/shader.c | 63 ++++++++++++++++------------------ dlls/wined3d/state.c | 4 +- dlls/wined3d/wined3d_private.h | 54 ++++++++++++----------------- 6 files changed, 129 insertions(+), 132 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=99bed5d41d456b681ab12…
1
0
0
0
← Newer
1
2
3
4
5
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200