winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
687 discussions
Start a n
N
ew thread
Dmitry Timoshkov : comctl32: Add more image list tests, fix one problem found.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 83f51d08df8a642e58a55950f758bd5011c4f60e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83f51d08df8a642e58a55950f…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Apr 24 18:33:59 2007 +0900 comctl32: Add more image list tests, fix one problem found. --- dlls/comctl32/imagelist.c | 2 +- dlls/comctl32/tests/imagelist.c | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index a49ac45..0c23d19 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2070,7 +2070,7 @@ ImageList_Remove (HIMAGELIST himl, INT i) return TRUE; } - himl->cMaxImage = himl->cInitial + 1; + himl->cMaxImage = himl->cInitial + himl->cGrow - 1; himl->cCurImage = 0; for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++) himl->nOvlIdx[nCount] = -1; diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 7a3d7ec..8b7cd6a 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -897,7 +897,15 @@ static void image_list_init(HIMAGELIST himl) static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, INT width, INT height, INT bpp, const char *comment) { - BOOL ret; + INT ret, cxx, cyy; + + ret = ImageList_GetImageCount(himl); + ok(ret == cur, "expected cur %d got %d\n", cur, ret); + + ret = ImageList_GetIconSize(himl, &cxx, &cyy); + ok(ret, "ImageList_GetIconSize failed\n"); + ok(cxx == cx, "wrong cx %d (expected %d)\n", cxx, cx); + ok(cyy == cy, "wrong cy %d (expected %d)\n", cyy, cy); iml_clear_stream_data(); ret = ImageList_Write(himl, &Test_Stream.is); @@ -941,6 +949,18 @@ static void test_imagelist_storage(void) ok(ret, "ImageList_Remove failed\n"); check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, BMP_CX * 4, BMP_CX * 7, 24, "4"); + ret = ImageList_Remove(himl, -2); + ok(!ret, "ImageList_Remove(-2) should fail\n"); + check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, BMP_CX * 4, BMP_CX * 7, 24, "5"); + + ret = ImageList_Remove(himl, 20); + ok(!ret, "ImageList_Remove(20) should fail\n"); + check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, BMP_CX * 4, BMP_CX * 7, 24, "6"); + + ret = ImageList_Remove(himl, -1); + ok(ret, "ImageList_Remove(-1) failed\n"); + check_iml_data(himl, BMP_CX, BMP_CX, 0, 4, BMP_CX * 4, BMP_CX * 1, 24, "7"); + ret = ImageList_Destroy(himl); ok(ret, "ImageList_Destroy failed\n");
1
0
0
0
Paul Vriens : crypt32/tests: Use A-version for registry functions.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 4c90bbd6f74dc41a99ff7115b592db0123ce9a84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c90bbd6f74dc41a99ff7115b…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Apr 24 09:11:44 2007 +0200 crypt32/tests: Use A-version for registry functions. --- dlls/crypt32/tests/oid.c | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/crypt32/tests/oid.c b/dlls/crypt32/tests/oid.c index 37c4643..c1cde67 100644 --- a/dlls/crypt32/tests/oid.c +++ b/dlls/crypt32/tests/oid.c @@ -84,6 +84,9 @@ static const struct OIDToAlgID algIDToOID[] = { { szOID_OIWSEC_sha1, CALG_SHA }, }; +static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 }; +static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 }; + static void testOIDToAlgID(void) { int i; @@ -264,7 +267,6 @@ static void test_installOIDFunctionAddress(void) static void test_registerOIDFunction(void) { - static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 }; BOOL ret; /* oddly, this succeeds under WinXP; the function name key is merely @@ -315,9 +317,6 @@ static void test_registerOIDFunction(void) ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); } -static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 }; -static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 }; - static void test_registerDefaultOIDFunction(void) { static const char fmt[] = @@ -354,24 +353,26 @@ static void test_registerDefaultOIDFunction(void) ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); sprintf(buf, fmt, 0, func); rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key); - ok(rc == 0, "Expected key to exist, RegOpenKeyW failed: %ld\n", rc); + ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %ld\n", rc); if (rc == 0) { - static const WCHAR dllW[] = { 'D','l','l',0 }; - WCHAR dllBuf[MAX_PATH]; + static const CHAR dllA[] = "Dll"; + static const CHAR bogusDll_A[] = "bogus.dll"; + static const CHAR bogus2Dll_A[] = "bogus2.dll"; + CHAR dllBuf[MAX_PATH]; DWORD type, size; - LPWSTR ptr; + LPSTR ptr; size = sizeof(dllBuf) / sizeof(dllBuf[0]); - rc = RegQueryValueExW(key, dllW, NULL, &type, (LPBYTE)dllBuf, &size); + rc = RegQueryValueExA(key, dllA, NULL, &type, (LPBYTE)dllBuf, &size); ok(rc == 0, - "Expected Dll value to exist, RegQueryValueExW failed: %ld\n", rc); + "Expected Dll value to exist, RegQueryValueExA failed: %ld\n", rc); ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type); /* bogusDll was registered first, so that should be first */ ptr = dllBuf; - ok(!lstrcmpiW(ptr, bogusDll), "Unexpected dll\n"); - ptr += lstrlenW(ptr) + 1; - ok(!lstrcmpiW(ptr, bogus2Dll), "Unexpected dll\n"); + ok(!lstrcmpiA(ptr, bogusDll_A), "Unexpected dll\n"); + ptr += lstrlenA(ptr) + 1; + ok(!lstrcmpiA(ptr, bogus2Dll_A), "Unexpected dll\n"); RegCloseKey(key); } /* Unregister both of them */
1
0
0
0
Andrew Talbot : dinput: Constify some variables.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 5e1ca160521403cdfecd8ca9b7e2025f8b95e71a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e1ca160521403cdfecd8ca9b…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Tue Apr 24 07:45:32 2007 +0100 dinput: Constify some variables. --- dlls/dinput/device.c | 12 ++++++------ dlls/dinput/device_private.h | 10 +++++----- dlls/dinput/effect_linuxinput.c | 12 ++++++------ dlls/dinput/joystick_linux.c | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 77c0c24..5d8c954 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -124,14 +124,14 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) { } } -void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) { +void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) { if (TRACE_ON(dinput)) { DPRINTF(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n", debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName); } } -void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) { +void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) { if (TRACE_ON(dinput)) { DPRINTF(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n", debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName)); @@ -217,7 +217,7 @@ void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) { } /* Conversion between internal data buffer and external data buffer */ -void fill_DataFormat(void *out, const void *in, DataFormat *df) { +void fill_DataFormat(void *out, const void *in, const DataFormat *df) { int i; const char *in_c = in; char *out_c = (char *) out; @@ -436,7 +436,7 @@ failed: } /* find an object by it's offset in a data format */ -static int offset_to_object(DataFormat *df, int offset) +static int offset_to_object(const DataFormat *df, int offset) { int i; @@ -460,14 +460,14 @@ static int id_to_object(LPCDIDATAFORMAT df, int id) return -1; } -int id_to_offset(DataFormat *df, int id) +int id_to_offset(const DataFormat *df, int id) { int obj = id_to_object(df->wine_df, id); return obj >= 0 && df->offsets ? df->offsets[obj] : -1; } -int find_property(DataFormat *df, LPCDIPROPHEADER ph) +int find_property(const DataFormat *df, LPCDIPROPHEADER ph) { switch (ph->dwHow) { diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index f62ad5c..4af99cc 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -68,13 +68,13 @@ struct IDirectInputDevice2AImpl }; /* Routines to do DataFormat / WineFormat conversions */ -extern void fill_DataFormat(void *out, const void *in, DataFormat *df) ; +extern void fill_DataFormat(void *out, const void *in, const DataFormat *df) ; extern HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format); extern void release_DataFormat(DataFormat *df) ; extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq); /* Helper functions to work with data format */ -extern int id_to_offset(DataFormat *df, int id); -extern int find_property(DataFormat *df, LPCDIPROPHEADER ph); +extern int id_to_offset(const DataFormat *df, int id); +extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph); /** * Callback Data used by specific callback @@ -92,8 +92,8 @@ extern BOOL DIEnumDevicesCallbackAtoW(LPCDIDEVICEOBJECTINSTANCEA, LPVOID); extern void _dump_cooperativelevel_DI(DWORD dwFlags) ; extern void _dump_EnumObjects_flags(DWORD dwFlags) ; extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) ; -extern void _dump_OBJECTINSTANCEA(DIDEVICEOBJECTINSTANCEA *ddoi) ; -extern void _dump_OBJECTINSTANCEW(DIDEVICEOBJECTINSTANCEW *ddoi) ; +extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) ; +extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) ; extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) ; extern const char *_dump_dinput_GUID(const GUID *guid) ; diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index e9f5604..f5851fc 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -118,7 +118,7 @@ static void _dump_DIEFFECT_flags(DWORD dwFlags) } } -static void _dump_DIENVELOPE(LPDIENVELOPE env) +static void _dump_DIENVELOPE(LPCDIENVELOPE env) { if (env->dwSize != sizeof(DIENVELOPE)) { WARN("Non-standard DIENVELOPE structure size (%d instead of %d).\n", @@ -128,31 +128,31 @@ static void _dump_DIENVELOPE(LPDIENVELOPE env) env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); } -static void _dump_DICONSTANTFORCE(LPDICONSTANTFORCE frc) +static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) { TRACE("Constant force has magnitude %d\n", frc->lMagnitude); } -static void _dump_DIPERIODIC(LPDIPERIODIC frc) +static void _dump_DIPERIODIC(LPCDIPERIODIC frc) { TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n", frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod); } -static void _dump_DIRAMPFORCE(LPDIRAMPFORCE frc) +static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) { TRACE("Ramp force has start %d, end %d\n", frc->lStart, frc->lEnd); } -static void _dump_DICONDITION(LPDICONDITION frc) +static void _dump_DICONDITION(LPCDICONDITION frc) { TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n", frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient, frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand); } -static void _dump_DICUSTOMFORCE(LPDICUSTOMFORCE frc) +static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) { unsigned int i; TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index bc4ef5b..50a5f49 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -120,7 +120,7 @@ static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903 {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} }; -static void _dump_DIDEVCAPS(LPDIDEVCAPS lpDIDevCaps) +static void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps) { TRACE("dwSize: %d\n", lpDIDevCaps->dwSize); TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);
1
0
0
0
Rolf Kalbermatter : advapi32: Make service_start_process return the pid to the caller.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: a60f60ac43f7dbea3648018e5bc6d57d186df5c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a60f60ac43f7dbea3648018e5…
Author: Rolf Kalbermatter <r.kalbermatter(a)hccnet.nl> Date: Tue Apr 24 07:15:04 2007 +0200 advapi32: Make service_start_process return the pid to the caller. --- dlls/advapi32/service.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 821b9d6..3979b06 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1436,7 +1436,7 @@ BOOL WINAPI StartServiceA( SC_HANDLE hService, DWORD dwNumServiceArgs, /****************************************************************************** * service_start_process [INTERNAL] */ -static DWORD service_start_process(struct sc_service *hsvc) +static DWORD service_start_process(struct sc_service *hsvc, LPDWORD ppid) { static const WCHAR _ImagePathW[] = {'I','m','a','g','e','P','a','t','h',0}; PROCESS_INFORMATION pi; @@ -1470,7 +1470,7 @@ static DWORD service_start_process(struct sc_service *hsvc) r = CreateProcessW(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); if (r) { - /* FIXME: Put the pid into the service struct */ + if (ppid) *ppid = pi.dwProcessId; handles[1] = pi.hProcess; ret = WaitForMultipleObjectsEx(2, handles, FALSE, 30000, FALSE); @@ -1523,6 +1523,7 @@ BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, { struct sc_service *hsvc; BOOL r = FALSE; + DWORD pid; SC_LOCK hLock; HANDLE handle = INVALID_HANDLE_VALUE; @@ -1543,7 +1544,7 @@ BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, if (handle==INVALID_HANDLE_VALUE) { /* start the service process */ - if (service_start_process(hsvc)) + if (service_start_process(hsvc, &pid)) handle = service_open_pipe(hsvc->name); }
1
0
0
0
Rolf Kalbermatter : advapi32: Make struct service_data_t have the new SERVICE_STATUS_PROCESS struct.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: e782b836be766315752867a6eaff74eb8c8c0d7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e782b836be766315752867a6e…
Author: Rolf Kalbermatter <r.kalbermatter(a)hccnet.nl> Date: Tue Apr 24 07:14:38 2007 +0200 advapi32: Make struct service_data_t have the new SERVICE_STATUS_PROCESS struct. --- dlls/advapi32/service.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 66ae8e7..821b9d6 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -62,7 +62,7 @@ typedef struct service_data_t LPHANDLER_FUNCTION_EX handler_ex; } handler; LPVOID context; - SERVICE_STATUS status; + SERVICE_STATUS_PROCESS status; HANDLE thread; BOOL unicode : 1; BOOL extended : 1; /* uses handler_ex instead of handler? */ @@ -499,7 +499,7 @@ static BOOL service_handle_get_status(HANDLE pipe, const service_data *service) /****************************************************************************** * service_get_status */ -static BOOL service_get_status(HANDLE pipe, LPSERVICE_STATUS status) +static BOOL service_get_status(HANDLE pipe, LPSERVICE_STATUS_PROCESS status) { DWORD cmd[2], count = 0; BOOL r; @@ -1470,6 +1470,8 @@ static DWORD service_start_process(struct sc_service *hsvc) r = CreateProcessW(NULL, path, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); if (r) { + /* FIXME: Put the pid into the service struct */ + handles[1] = pi.hProcess; ret = WaitForMultipleObjectsEx(2, handles, FALSE, 30000, FALSE); if(ret != WAIT_OBJECT_0) @@ -1645,17 +1647,12 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, pipe = service_open_pipe(hsvc->name); if (pipe != INVALID_HANDLE_VALUE) { - r = service_get_status(pipe, (LPSERVICE_STATUS)&pSvcStatusData); + r = service_get_status(pipe, pSvcStatusData); CloseHandle(pipe); if (r) return TRUE; } - /* FIXME: this would be the pid from service_start_process() */ - pSvcStatusData->dwProcessId = 0; - /* service is running in a process that is not a system process */ - pSvcStatusData->dwServiceFlags = 0; - TRACE("Failed to read service status\n"); /* read the service type from the registry */
1
0
0
0
Jason Edmeades : cmd.exe: Support for DEL filename /s.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 68b11d12906655bdb27053ffa14de74399620811 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68b11d12906655bdb27053ffa…
Author: Jason Edmeades <us(a)edmeades.me.uk> Date: Mon Apr 23 23:24:38 2007 +0100 cmd.exe: Support for DEL filename /s. --- programs/cmd/README | 7 --- programs/cmd/builtins.c | 128 +++++++++++++++++++++++++++++++++++++++++----- programs/cmd/directory.c | 7 --- programs/cmd/wcmd.h | 11 ++++- programs/cmd/wcmdmain.c | 2 +- 5 files changed, 125 insertions(+), 30 deletions(-) diff --git a/programs/cmd/README b/programs/cmd/README index ee1c542..d7d80c2 100644 --- a/programs/cmd/README +++ b/programs/cmd/README @@ -11,7 +11,6 @@ WHAT'S INCLUDED WHAT'S MISSING - Command-line qualifiers for most builtin commands -- Wildcards and relative paths in COPY, MOVE and RENAME - Set functionality in DATE, TIME, ATTRIB, LABEL - Full internationalisation of the text (and commands?). @@ -26,11 +25,6 @@ US date-time format is used. Set eg "LANG=en_GB" for DD/MM/YY dates and 24-hour times. - Line editing and command recall doesn't work due to missing functionality in Wine. -- DIR/S only works if no file specification is given, ie "DIR C:\TEMP /S" works -but "DIR C:\TEMP\*.C" doesn't work if a matching file exists in a lower -directory. -- Copy, rename, move, need the source and destination to be specified fully -with an absolute or relative path but no wildcards or partial filenames. - Redirection is implemented as a command line is parsed. This means that ">" and "<" symbols cannot appear in command arguments even within quotes. - In many cases parsing and syntax checking is less rigorous than DOS. Thus an @@ -43,4 +37,3 @@ image. The Wine binary is simpler to invoke from the U**x command line or from a GUI such as KDE, however it is not possible to invoke a second shell using the "CMD /C filename" syntax. Conversely a Win32 application can be invoked from a Win32 GUI such as Program Manager but that needs starting under Wine first. - diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index e7398fd..4d0fd5e 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -239,24 +239,32 @@ void WCMD_create_dir (void) { * non-hidden files */ -void WCMD_delete (char *command) { +BOOL WCMD_delete (char *command, BOOL expectDir) { int argno = 0; int argsProcessed = 0; char *argN = command; + BOOL foundAny = FALSE; + + /* If not recursing, clear error flag */ + if (expectDir) errorlevel = 0; /* Loop through all args */ while (argN) { char *thisArg = WCMD_parameter (command, argno++, &argN); + char argCopy[MAX_PATH]; + if (argN && argN[0] != '/') { WIN32_FIND_DATA fd; HANDLE hff; char fpath[MAX_PATH]; char *p; + BOOL handleParm = TRUE; + BOOL found = FALSE; - - WINE_TRACE("del: Processing arg %s (quals:%s)\n", thisArg, quals); + strcpy(argCopy, thisArg); + WINE_TRACE("del: Processing arg %s (quals:%s)\n", argCopy, quals); argsProcessed++; /* If filename part of parameter is * or *.*, prompt unless @@ -269,7 +277,7 @@ void WCMD_delete (char *command) { char ext[MAX_PATH]; /* Convert path into actual directory spec */ - GetFullPathName (thisArg, sizeof(fpath), fpath, NULL); + GetFullPathName (argCopy, sizeof(fpath), fpath, NULL); WCMD_splitpath(fpath, drive, dir, fname, ext); /* Only prompt for * and *.*, not *a, a*, *.a* etc */ @@ -278,6 +286,9 @@ void WCMD_delete (char *command) { BOOL ok; char question[MAXSTRING]; + /* Note: Flag as found, to avoid file not found message */ + found = TRUE; + /* Ask for confirmation */ sprintf(question, "%s, ", fpath); ok = WCMD_ask_confirm(question, TRUE); @@ -287,25 +298,28 @@ void WCMD_delete (char *command) { } } - hff = FindFirstFile (thisArg, &fd); + /* First, try to delete in the current directory */ + hff = FindFirstFile (argCopy, &fd); if (hff == INVALID_HANDLE_VALUE) { - WCMD_output ("%s :File Not Found\n", thisArg); - continue; + handleParm = FALSE; + } else { + found = TRUE; } + /* Support del <dirname> by just deleting all files dirname\* */ - if ((strchr(thisArg,'*') == NULL) && (strchr(thisArg,'?') == NULL) + if (handleParm && (strchr(argCopy,'*') == NULL) && (strchr(argCopy,'?') == NULL) && (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { char modifiedParm[MAX_PATH]; - strcpy(modifiedParm, thisArg); + strcpy(modifiedParm, argCopy); strcat(modifiedParm, "\\*"); FindClose(hff); - WCMD_delete(modifiedParm); - continue; + found = TRUE; + WCMD_delete(modifiedParm, FALSE); - } else { + } else if (handleParm) { /* Build the filename to delete as <supplied directory>\<findfirst filename> */ - strcpy (fpath, thisArg); + strcpy (fpath, argCopy); do { p = strrchr (fpath, '\\'); if (p != NULL) { @@ -399,14 +413,100 @@ void WCMD_delete (char *command) { } while (FindNextFile(hff, &fd) != 0); FindClose (hff); } + + /* Now recurse into all subdirectories handling the paramater in the same way */ + if (strstr (quals, "/S") != NULL) { + + char thisDir[MAX_PATH]; + int cPos; + + char drive[10]; + char dir[MAX_PATH]; + char fname[MAX_PATH]; + char ext[MAX_PATH]; + + /* Convert path into actual directory spec */ + GetFullPathName (argCopy, sizeof(thisDir), thisDir, NULL); + WCMD_splitpath(thisDir, drive, dir, fname, ext); + + strcpy(thisDir, drive); + strcat(thisDir, dir); + cPos = strlen(thisDir); + + WINE_TRACE("Searching recursively in '%s'\n", thisDir); + + /* Append '*' to the directory */ + thisDir[cPos] = '*'; + thisDir[cPos+1] = 0x00; + + hff = FindFirstFile (thisDir, &fd); + + /* Remove residual '*' */ + thisDir[cPos] = 0x00; + + if (hff != INVALID_HANDLE_VALUE) { + DIRECTORY_STACK *allDirs = NULL; + DIRECTORY_STACK *lastEntry = NULL; + + do { + if ((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + (strcmp(fd.cFileName, "..") != 0) && + (strcmp(fd.cFileName, ".") != 0)) { + + DIRECTORY_STACK *nextDir; + char subParm[MAX_PATH]; + + /* Work out search parameter in sub dir */ + strcpy (subParm, thisDir); + strcat (subParm, fd.cFileName); + strcat (subParm, "\\"); + strcat (subParm, fname); + strcat (subParm, ext); + WINE_TRACE("Recursive, Adding to search list '%s'\n", subParm); + + /* Allocate memory, add to list */ + nextDir = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); + if (allDirs == NULL) allDirs = nextDir; + if (lastEntry != NULL) lastEntry->next = nextDir; + lastEntry = nextDir; + nextDir->next = NULL; + nextDir->dirName = HeapAlloc(GetProcessHeap(),0,(strlen(subParm)+1)); + strcpy(nextDir->dirName, subParm); + } + } while (FindNextFile(hff, &fd) != 0); + FindClose (hff); + + /* Go through each subdir doing the delete */ + while (allDirs != NULL) { + DIRECTORY_STACK *tempDir; + + tempDir = allDirs->next; + found |= WCMD_delete (allDirs->dirName, FALSE); + + HeapFree(GetProcessHeap(),0,allDirs->dirName); + HeapFree(GetProcessHeap(),0,allDirs); + allDirs = tempDir; + } + } + } + /* Keep running total to see if any found, and if not recursing + issue error message */ + if (expectDir) { + if (!found) { + errorlevel = 1; + WCMD_output ("%s : File Not Found\n", argCopy); + } + } + foundAny |= found; } } /* Handle no valid args */ if (argsProcessed == 0) { WCMD_output ("Argument missing\n"); - return; } + + return foundAny; } /**************************************************************************** diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index 801d59d..24c7c6c 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -57,13 +57,6 @@ typedef enum _DISPLAYORDER Date } DISPLAYORDER; -typedef struct _DIRECTORY_STACK -{ - struct _DIRECTORY_STACK *next; - char *dirName; - char *fileName; -} DIRECTORY_STACK; - static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *parms, int level); static int file_total, dir_total, recurse, wide, bare, max_width, lower; static int shortname, usernames; diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index 8718dd6..76cd22b 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -35,7 +35,7 @@ void WCMD_clear_screen (void); void WCMD_color (void); void WCMD_copy (void); void WCMD_create_dir (void); -void WCMD_delete (char *); +BOOL WCMD_delete (char *, BOOL); void WCMD_directory (char *); void WCMD_echo (const char *); void WCMD_endlocal (void); @@ -109,6 +109,15 @@ struct env_stack WCHAR *strings; }; +/* Data structure to handle building lists during recursive calls */ + +typedef struct _DIRECTORY_STACK +{ + struct _DIRECTORY_STACK *next; + char *dirName; + char *fileName; +} DIRECTORY_STACK; + #endif /* !RC_INVOKED */ /* diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 88a827c..a74b085 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -620,7 +620,7 @@ void WCMD_process_command (char *command) break; case WCMD_DEL: case WCMD_ERASE: - WCMD_delete (p); + WCMD_delete (p, TRUE); break; case WCMD_DIR: WCMD_directory (p);
1
0
0
0
Detlef Riekenberg : localui: Implement ConfigurePortUI for COMx.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 67fff3959fcc5d74167c4fc3a66e68990e3e1dba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67fff3959fcc5d74167c4fc3a…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Apr 24 00:08:24 2007 +0200 localui: Implement ConfigurePortUI for COMx. --- dlls/localui/localui.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++- dlls/localui/localui.h | 15 ++++++ 2 files changed, 139 insertions(+), 3 deletions(-) diff --git a/dlls/localui/localui.c b/dlls/localui/localui.c index 2fd61c3..133fd60 100644 --- a/dlls/localui/localui.c +++ b/dlls/localui/localui.c @@ -32,15 +32,32 @@ #include "ddk/winsplp.h" #include "wine/debug.h" +#include "wine/unicode.h" #include "localui.h" WINE_DEFAULT_DEBUG_CHANNEL(localui); +/*****************************************************/ + static HINSTANCE LOCALUI_hInstance; static const WCHAR cmd_DeletePortW[] = {'D','e','l','e','t','e','P','o','r','t',0}; +static const WCHAR cmd_GetDefaultCommConfigW[] = {'G','e','t', + 'D','e','f','a','u','l','t', + 'C','o','m','m','C','o','n','f','i','g',0}; +static const WCHAR cmd_SetDefaultCommConfigW[] = {'S','e','t', + 'D','e','f','a','u','l','t', + 'C','o','m','m','C','o','n','f','i','g',0}; + +static const WCHAR portname_LPT[] = {'L','P','T',0}; +static const WCHAR portname_COM[] = {'C','O','M',0}; +static const WCHAR portname_FILE[] = {'F','I','L','E',':',0}; +static const WCHAR portname_CUPS[] = {'C','U','P','S',':',0}; +static const WCHAR portname_LPR[] = {'L','P','R',':',0}; + static const WCHAR XcvPortW[] = {',','X','c','v','P','o','r','t',' ',0}; + /***************************************************** * strdupWW [internal] */ @@ -59,6 +76,52 @@ static LPWSTR strdupWW(LPCWSTR pPrefix, LPCWSTR pSuffix) return ptr; } +/***************************************************** + * dlg_configure_com [internal] + * + */ + +static BOOL dlg_configure_com(HANDLE hXcv, HWND hWnd, PCWSTR pPortName) +{ + COMMCONFIG cfg; + LPWSTR shortname; + DWORD status; + DWORD dummy; + DWORD len; + BOOL res; + + /* strip the colon (pPortName is never empty here) */ + len = lstrlenW(pPortName); + shortname = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (shortname) { + memcpy(shortname, pPortName, (len -1) * sizeof(WCHAR)); + shortname[len-1] = '\0'; + + /* get current settings */ + len = sizeof(cfg); + status = ERROR_SUCCESS; + res = XcvDataW( hXcv, cmd_GetDefaultCommConfigW, + (PBYTE) shortname, + (lstrlenW(shortname) +1) * sizeof(WCHAR), + (PBYTE) &cfg, len, &len, &status); + + if (res && (status == ERROR_SUCCESS)) { + /* display the Dialog */ + res = CommConfigDialogW(pPortName, hWnd, &cfg); + if (res) { + status = ERROR_SUCCESS; + /* set new settings */ + res = XcvDataW(hXcv, cmd_SetDefaultCommConfigW, + (PBYTE) &cfg, len, + (PBYTE) &dummy, 0, &len, &status); + } + } + HeapFree(GetProcessHeap(), 0, shortname); + return res; + } + return FALSE; +} + /****************************************************************** * display the Dialog "Nothing to configure" * @@ -78,6 +141,52 @@ static void dlg_nothingtoconfig(HWND hWnd) } /***************************************************** + * get_type_from_name (internal) + * + */ + +static DWORD get_type_from_name(LPCWSTR name) +{ + HANDLE hfile; + + if (!strncmpiW(name, portname_LPT, sizeof(portname_LPT) / sizeof(WCHAR) -1)) + return PORT_IS_LPT; + + if (!strncmpiW(name, portname_COM, sizeof(portname_COM) / sizeof(WCHAR) -1)) + return PORT_IS_COM; + + if (!strcmpiW(name, portname_FILE)) + return PORT_IS_FILE; + + if (name[0] == '/') + return PORT_IS_UNIXNAME; + + if (name[0] == '|') + return PORT_IS_PIPE; + + if (!strncmpW(name, portname_CUPS, sizeof(portname_CUPS) / sizeof(WCHAR) -1)) + return PORT_IS_CUPS; + + if (!strncmpW(name, portname_LPR, sizeof(portname_LPR) / sizeof(WCHAR) -1)) + return PORT_IS_LPR; + + /* Must be a file or a directory. Does the file exist ? */ + hfile = CreateFileW(name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + TRACE("%p for OPEN_EXISTING on %s\n", hfile, debugstr_w(name)); + if (hfile == INVALID_HANDLE_VALUE) { + /* Can we create the file? */ + hfile = CreateFileW(name, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + TRACE("%p for OPEN_ALWAYS\n", hfile); + } + if (hfile != INVALID_HANDLE_VALUE) { + CloseHandle(hfile); + return PORT_IS_FILENAME; + } + /* We can't use the name. use GetLastError() for the reason */ + return PORT_IS_UNKNOWN; +} + +/***************************************************** * open_monitor_by_name [internal] * */ @@ -141,16 +250,28 @@ static BOOL WINAPI localui_AddPortUI(PCWSTR pName, HWND hWnd, PCWSTR pMonitorNam static BOOL WINAPI localui_ConfigurePortUI(PCWSTR pName, HWND hWnd, PCWSTR pPortName) { HANDLE hXcv; + DWORD res; TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName)); if (open_monitor_by_name(XcvPortW, pPortName, &hXcv)) { - dlg_nothingtoconfig(hWnd); + res = get_type_from_name(pPortName); + switch(res) + { + + case PORT_IS_COM: + res = dlg_configure_com(hXcv, hWnd, pPortName); + break; + + default: + dlg_nothingtoconfig(hWnd); + SetLastError(ERROR_CANCELLED); + res = FALSE; + } ClosePrinter(hXcv); - return TRUE; + return res; } - SetLastError(ERROR_UNKNOWN_PORT); return FALSE; } diff --git a/dlls/localui/localui.h b/dlls/localui/localui.h index eb7dfff..581922a 100644 --- a/dlls/localui/localui.h +++ b/dlls/localui/localui.h @@ -30,5 +30,20 @@ #define IDS_LOCALPORT_MAXLEN 32 #define IDS_NOTHINGTOCONFIG_MAXLEN 80 +/* ## Type of Ports ## */ +/* windows types */ +#define PORT_IS_UNKNOWN 0 +#define PORT_IS_LPT 1 +#define PORT_IS_COM 2 +#define PORT_IS_FILE 3 +#define PORT_IS_FILENAME 4 + +/* wine extensions */ +#define PORT_IS_WINE 5 +#define PORT_IS_UNIXNAME 5 +#define PORT_IS_PIPE 6 +#define PORT_IS_CUPS 7 +#define PORT_IS_LPR 8 + #endif /* __WINE_LOCALUI__ */
1
0
0
0
Detlef Riekenberg : localui: Avoid crash on NULL pointer.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 009b8dd519cdef7bde42262b60579d8509c37ec2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=009b8dd519cdef7bde42262b6…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Apr 24 00:05:47 2007 +0200 localui: Avoid crash on NULL pointer. --- dlls/localui/localui.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/localui/localui.c b/dlls/localui/localui.c index 36b2812..2fd61c3 100644 --- a/dlls/localui/localui.c +++ b/dlls/localui/localui.c @@ -50,11 +50,11 @@ static LPWSTR strdupWW(LPCWSTR pPrefix, LPCWSTR pSuffix) LPWSTR ptr; DWORD len; - len = lstrlenW(pPrefix) + lstrlenW(pSuffix) + 1; + len = lstrlenW(pPrefix) + (pSuffix ? lstrlenW(pSuffix) : 0) + 1; ptr = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (ptr) { lstrcpyW(ptr, pPrefix); - lstrcatW(ptr, pSuffix); + if (pSuffix) lstrcatW(ptr, pSuffix); } return ptr; }
1
0
0
0
Lei Zhang : comdlg32: Initialize CommDlgExtendedError() return value for file dialogs.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 7aa1b2e419976a14495227bfd45b37cdae219207 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aa1b2e419976a14495227bfd…
Author: Lei Zhang <thestig(a)google.com> Date: Mon Apr 23 14:20:37 2007 -0700 comdlg32: Initialize CommDlgExtendedError() return value for file dialogs. --- dlls/comdlg32/filedlg.c | 6 ++ dlls/comdlg32/tests/Makefile.in | 3 +- dlls/comdlg32/tests/filedlg.c | 104 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index e267e45..0b940ea 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -323,6 +323,9 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) LPWSTR filter = NULL; LPWSTR customfilter = NULL; + /* Initialize CommDlgExtendedError() */ + COMDLG32_SetCommDlgExtendedError(0); + /* Initialize FileOpenDlgInfos structure */ ZeroMemory(&fodInfos, sizeof(FileOpenDlgInfos)); @@ -453,6 +456,9 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) FileOpenDlgInfos fodInfos; LPWSTR lpstrSavDir = NULL; + /* Initialize CommDlgExtendedError() */ + COMDLG32_SetCommDlgExtendedError(0); + /* Initialize FileOpenDlgInfos structure */ ZeroMemory(&fodInfos, sizeof(FileOpenDlgInfos)); diff --git a/dlls/comdlg32/tests/Makefile.in b/dlls/comdlg32/tests/Makefile.in index aa1ec87..c3bf0cb 100644 --- a/dlls/comdlg32/tests/Makefile.in +++ b/dlls/comdlg32/tests/Makefile.in @@ -3,9 +3,10 @@ TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = comdlg32.dll -IMPORTS = comdlg32 kernel32 +IMPORTS = comdlg32 user32 kernel32 CTESTS = \ + filedlg.c \ printdlg.c @MAKE_TEST_RULES@ diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c new file mode 100644 index 0000000..9ae0c40 --- /dev/null +++ b/dlls/comdlg32/tests/filedlg.c @@ -0,0 +1,104 @@ +/* + * Unit test suite for comdlg32 API functions: file dialogs + * + * Copyright 2007 Google (Lei Zhang) + * + * 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 + * + */ + +#include <windows.h> +#include <wine/test.h> + + +/* ##### */ + +static UINT CALLBACK OFNHookProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + LPNMHDR nmh; + + if( msg == WM_NOTIFY) + { + nmh = (LPNMHDR) lParam; + if( nmh->code == CDN_INITDONE) + { + PostMessage( GetParent(hDlg), WM_COMMAND, IDCANCEL, FALSE); + } + } + + return 0; +} + +/* bug 6829 */ +static void test_DialogCancel(void) +{ + OPENFILENAMEA ofn; + BOOL result; + char szFileName[MAX_PATH] = ""; + + ZeroMemory(&ofn, sizeof(ofn)); + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = NULL; + ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0"; + ofn.lpstrFile = szFileName; + ofn.nMaxFile = MAX_PATH; + ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ENABLEHOOK; + ofn.lpstrDefExt = "txt"; + ofn.lpfnHook = (LPOFNHOOKPROC) OFNHookProc; + + PrintDlgA(NULL); + ok(CDERR_INITIALIZATION == CommDlgExtendedError(), "expected %d, got %d\n", + CDERR_INITIALIZATION, CommDlgExtendedError()); + + result = GetOpenFileNameA(&ofn); + ok(0 == result, "expected %d, got %d\n", 0, result); + ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + CommDlgExtendedError()); + + PrintDlgA(NULL); + ok(CDERR_INITIALIZATION == CommDlgExtendedError(), "expected %d, got %d\n", + CDERR_INITIALIZATION, CommDlgExtendedError()); + + result = GetOpenFileNameW((LPOPENFILENAMEW) &ofn); + ok(0 == result, "expected %d, got %d\n", 0, result); + ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + CommDlgExtendedError()); + + PrintDlgA(NULL); + ok(CDERR_INITIALIZATION == CommDlgExtendedError(), "expected %d, got %d\n", + CDERR_INITIALIZATION, CommDlgExtendedError()); + + result = GetSaveFileNameA(&ofn); + ok(0 == result, "expected %d, got %d\n", 0, result); + ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + CommDlgExtendedError()); + + PrintDlgA(NULL); + ok(CDERR_INITIALIZATION == CommDlgExtendedError(), "expected %d, got %d\n", + CDERR_INITIALIZATION, CommDlgExtendedError()); + + result = GetSaveFileNameW((LPOPENFILENAMEW) &ofn); + ok(0 == result, "expected %d, got %d\n", 0, result); + ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + CommDlgExtendedError()); +} + + +START_TEST(filedlg) +{ + test_DialogCancel(); + +}
1
0
0
0
H. Verbeet : wined3d: The second parameter to glTexImage3DEXT isn' t a GLenum.
by Alexandre Julliard
24 Apr '07
24 Apr '07
Module: wine Branch: master Commit: 2100b9dce96d804d2b9bd4bf8345a1dc8097bb9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2100b9dce96d804d2b9bd4bf8…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Mon Apr 23 22:03:04 2007 +0200 wined3d: The second parameter to glTexImage3DEXT isn't a GLenum. --- dlls/wined3d/volume.c | 2 +- dlls/wined3d/volumetexture.c | 2 +- include/wine/wined3d_interface.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index c50e489..f0ea113 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -262,7 +262,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWi return WINED3D_OK; } -static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_level) { +static HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, int gl_level) { IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; WINED3DFORMAT format = This->resource.format; const PixelFormatDesc *formatEntry = getFormatDescEntry(format); diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 1d75bdc..2b26eb3 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -92,7 +92,7 @@ static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface) { /* Overrider the IWineD3DResource Preload method */ - UINT i; + int i; IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 85653a4..cf4a1de 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -1209,7 +1209,7 @@ DECLARE_INTERFACE_(IWineD3DVolume,IWineD3DResource) STDMETHOD(UnlockBox)(THIS) PURE; STDMETHOD(AddDirtyBox)(THIS_ CONST WINED3DBOX* pDirtyBox) PURE; STDMETHOD(CleanDirtyBox)(THIS) PURE; - STDMETHOD(LoadTexture)(THIS_ UINT gl_level) PURE; + STDMETHOD(LoadTexture)(THIS_ int gl_level) PURE; STDMETHOD(SetContainer)(THIS_ IWineD3DBase *container) PURE; }; #undef INTERFACE
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
69
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Results per page:
10
25
50
100
200