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
July 2007
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
957 discussions
Start a n
N
ew thread
Paul Vriens : advapi32/service: Test GetServiceDisplayNameA for service with no displayname.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 23d61ac86638462aa7bd127625127cc68b060923 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23d61ac86638462aa7bd12762…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 26 13:54:22 2007 +0200 advapi32/service: Test GetServiceDisplayNameA for service with no displayname. --- dlls/advapi32/tests/service.c | 61 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 0 deletions(-) diff --git a/dlls/
…
[View More]
advapi32/tests/service.c b/dlls/advapi32/tests/service.c index e5711e4..cf01726 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -387,6 +387,8 @@ static void test_get_displayname(void) DWORD displaysize, tempsize, tempsizeW; static const CHAR deadbeef[] = "Deadbeef"; static const WCHAR spoolerW[] = {'S','p','o','o','l','e','r',0}; + static const CHAR servicename[] = "Winetest"; + static const CHAR pathname[] = "we_dont_care.exe"; /* Having NULL for the size of the buffer will crash on W2K3 */ @@ -541,6 +543,65 @@ static void test_get_displayname(void) } CloseServiceHandle(scm_handle); + + /* Test for a service without a displayname (which is valid). This should return + * the servicename itself. + */ + SetLastError(0xdeadbeef); + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CREATE_SERVICE); + if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) + { + skip("Not enough rights to get a handle to the manager\n"); + return; + } + + SetLastError(0xdeadbeef); + svc_handle = CreateServiceA(scm_handle, servicename, NULL, DELETE, + SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, + SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); + ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); + if (!svc_handle) + { + CloseServiceHandle(scm_handle); + return; + } + + /* Retrieve the needed size for the buffer */ + SetLastError(0xdeadbeef); + displaysize = -1; + ret = GetServiceDisplayNameA(scm_handle, servicename, NULL, &displaysize); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(displaysize == lstrlen(servicename) * 2, + "Expected the displaysize to be twice the size of the servicename\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + } + + /* Get the displayname */ + SetLastError(0xdeadbeef); + ret = GetServiceDisplayNameA(scm_handle, servicename, displayname, &displaysize); + todo_wine + { + ok(ret, "Expected success\n"); + ok(!lstrcmpi(displayname, servicename), + "Expected displayname to be %s, got %s\n", servicename, displayname); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == ERROR_IO_PENDING /* W2K */ || + GetLastError() == 0xdeadbeef /* NT4, XP, Vista */, + "Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d\n", GetLastError()); + } + + /* Delete the service */ + ret = DeleteService(svc_handle); + ok(ret, "Expected success\n"); + + CloseServiceHandle(svc_handle); + CloseServiceHandle(scm_handle); + + /* Wait a while. Just in case one of the following tests does a CreateService again */ + Sleep(1000); } static void test_get_servicekeyname(void)
[View Less]
1
0
0
0
Paul Vriens : advapi32/service: More tests for GetServiceDisplayName.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: adb3bbf274f0a720c0f65d0b1c62507dd305f632 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adb3bbf274f0a720c0f65d0b1…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 26 13:51:30 2007 +0200 advapi32/service: More tests for GetServiceDisplayName. --- dlls/advapi32/tests/service.c | 70 +++++++++++++++++++++++++++++++++++++--- 1 files changed, 64 insertions(+), 6 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/
…
[View More]
dlls/advapi32/tests/service.c index 476c26e..e5711e4 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -440,9 +440,49 @@ static void test_get_displayname(void) ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + /* Buffer is too small */ SetLastError(0xdeadbeef); tempsize = displaysize; - displaysize *= 2; + displaysize = (tempsize / 2); + ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); + ok(!ret, "Expected failure\n"); + ok(displaysize == tempsize, "Expected the needed buffersize\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + + /* First try with a buffer that should be big enough to hold + * the ANSI string (and terminating character). This succeeds on Windows + * although when asked (see above 2 tests) it will return twice the needed size. + */ + SetLastError(0xdeadbeef); + displaysize = (tempsize / 2) + 1; + ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); + todo_wine + { + ok(ret, "Expected success\n"); + ok(displaysize == ((tempsize / 2) + 1), "Expected no change for the needed buffer size\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == ERROR_IO_PENDING /* W2K */ || + GetLastError() == 0xdeadbeef /* NT4, XP, Vista */, + "Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d\n", GetLastError()); + } + + /* Now with the original returned size */ + SetLastError(0xdeadbeef); + displaysize = tempsize; + ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); + todo_wine + ok(ret, "Expected success\n"); + ok(displaysize == tempsize, "Expected no change for the needed buffer size\n"); + todo_wine + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == ERROR_IO_PENDING /* W2K */ || + GetLastError() == 0xdeadbeef /* NT4, XP, Vista */, + "Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d\n", GetLastError()); + + /* And with a bigger then needed buffer */ + SetLastError(0xdeadbeef); + displaysize = tempsize * 2; ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); ok(ret, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || @@ -450,12 +490,12 @@ static void test_get_displayname(void) GetLastError() == 0xdeadbeef /* NT4, XP, Vista */, "Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d\n", GetLastError()); /* Test that shows that if the buffersize is enough, it's not changed */ - ok(displaysize == tempsize * 2, "Didn't expect a change in the needed size of the buffer\n"); + ok(displaysize == tempsize * 2, "Expected no change for the needed buffer size\n"); todo_wine ok(lstrlen(displayname) == tempsize/2, "Expected the buffer to be twice the length of the string\n") ; - /* Do the last 2 tests also for GetServiceDisplayNameW */ + /* Do the buffer(size) tests also for GetServiceDisplayNameW */ SetLastError(0xdeadbeef); displaysize = -1; ret = GetServiceDisplayNameW(scm_handle, spoolerW, NULL, &displaysize); @@ -463,19 +503,37 @@ static void test_get_displayname(void) ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + /* Buffer is too small */ SetLastError(0xdeadbeef); tempsizeW = displaysize; - displaysize *= 2; + displaysize = tempsizeW / 2; + ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); + ok(!ret, "Expected failure\n"); + ok(displaysize = tempsizeW, "Expected the needed buffersize\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + + /* Now with the original returned size */ + SetLastError(0xdeadbeef); + displaysize = tempsizeW; + ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); + ok(!ret, "Expected failure\n"); + ok(displaysize = tempsizeW, "Expected the needed buffersize\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + + /* And with a bigger then needed buffer */ + SetLastError(0xdeadbeef); + displaysize = tempsizeW + 1; /* This caters for the null terminating character */ ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); ok(ret, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || GetLastError() == ERROR_IO_PENDING /* W2K */ || GetLastError() == 0xdeadbeef /* NT4, XP, Vista */, "Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d\n", GetLastError()); - /* Test that shows that the buffersize is changed to the needed size */ todo_wine { - ok(displaysize == tempsizeW, "Did expect a change in the needed size of the buffer\n"); + ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); ok(lstrlenW(displaynameW) == displaysize, "Expected the buffer to be the length of the string\n") ; ok(tempsize / 2 == tempsizeW,
[View Less]
1
0
0
0
Aric Stewart : wininet: Strip Accept-Encoding from http/1.0 requests.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: c8dfc02bfb77bb3186fbcad2cef373d580939d55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8dfc02bfb77bb3186fbcad2c…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Jul 26 08:59:00 2007 -0500 wininet: Strip Accept-Encoding from http/1.0 requests. --- dlls/wininet/http.c | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 71f7800..8c50ec9
…
[View More]
100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -118,6 +118,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD lpdwIndex); static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl); static UINT HTTP_DecodeBase64(LPCWSTR base64, LPSTR bin); +static BOOL HTTP_VerifyValidHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field); LPHTTPHEADERW HTTP_GetHeader(LPWININETHTTPREQW req, LPCWSTR head) @@ -636,8 +637,10 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr, pFieldAndValue = HTTP_InterpretHttpHeader(lpszStart); if (pFieldAndValue) { - bSuccess = HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], - pFieldAndValue[1], dwModifier | HTTP_ADDHDR_FLAG_REQ); + bSuccess = HTTP_VerifyValidHeader(lpwhr, pFieldAndValue[0]); + if (bSuccess) + bSuccess = HTTP_ProcessHeader(lpwhr, pFieldAndValue[0], + pFieldAndValue[1], dwModifier | HTTP_ADDHDR_FLAG_REQ); HTTP_FreeTokens(pFieldAndValue); } @@ -3516,6 +3519,24 @@ static BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index) return TRUE; } + +/*********************************************************************** + * HTTP_VerifyValidHeader (internal) + * + * Verify the given header is not invalid for the given http request + * + */ +static BOOL HTTP_VerifyValidHeader(LPWININETHTTPREQW lpwhr, LPCWSTR field) +{ + BOOL rc = TRUE; + + /* Accept-Encoding is stripped from HTTP/1.0 requests. It is invalid */ + if (strcmpiW(field,szAccept_Encoding)==0) + return FALSE; + + return rc; +} + /*********************************************************************** * IsHostInProxyBypassList (@) *
[View Less]
1
0
0
0
Detlef Riekenberg : winspool: Return most fields for DRIVER_INFO_4 and 6.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 510c4dc749197ec05e5a1e2f620dccc5b38bf455 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=510c4dc749197ec05e5a1e2f6…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jul 26 23:37:22 2007 +0200 winspool: Return most fields for DRIVER_INFO_4 and 6. --- dlls/winspool.drv/info.c | 96 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 84 insertions(+), 12 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/
…
[View More]
winspool.drv/info.c index d00afc5..2d892a3 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -205,28 +205,27 @@ static const WCHAR Configuration_FileW[] = {'C','o','n','f','i','g','u','r','a', 'i','o','n',' ','F','i','l','e',0}; static const WCHAR DatatypeW[] = {'D','a','t','a','t','y','p','e',0}; static const WCHAR Data_FileW[] = {'D','a','t','a',' ','F','i','l','e',0}; -static const WCHAR Default_DevModeW[] = {'D','e','f','a','u','l','t',' ','D','e','v', - 'M','o','d','e',0}; -static const WCHAR Dependent_FilesW[] = {'D','e','p','e','n','d','e','n','t',' ','F', - 'i','l','e','s',0}; +static const WCHAR Default_DevModeW[] = {'D','e','f','a','u','l','t',' ','D','e','v','M','o','d','e',0}; +static const WCHAR Dependent_FilesW[] = {'D','e','p','e','n','d','e','n','t',' ','F','i','l','e','s',0}; static const WCHAR DescriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR DriverW[] = {'D','r','i','v','e','r',0}; +static const WCHAR HardwareIDW[] = {'H','a','r','d','w','a','r','e','I','D',0}; static const WCHAR Help_FileW[] = {'H','e','l','p',' ','F','i','l','e',0}; static const WCHAR LocationW[] = {'L','o','c','a','t','i','o','n',0}; +static const WCHAR ManufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR MonitorW[] = {'M','o','n','i','t','o','r',0}; static const WCHAR MonitorUIW[] = {'M','o','n','i','t','o','r','U','I',0}; static const WCHAR NameW[] = {'N','a','m','e',0}; +static const WCHAR OEM_UrlW[] = {'O','E','M',' ','U','r','l',0}; static const WCHAR ParametersW[] = {'P','a','r','a','m','e','t','e','r','s',0}; static const WCHAR PortW[] = {'P','o','r','t',0}; static const WCHAR bs_Ports_bsW[] = {'\\','P','o','r','t','s','\\',0}; -static const WCHAR Print_ProcessorW[] = {'P','r','i','n','t',' ','P','r','o','c','e', - 's','s','o','r',0}; -static const WCHAR Printer_DriverW[] = {'P','r','i','n','t','e','r',' ','D','r','i', - 'v','e','r',0}; -static const WCHAR PrinterDriverDataW[] = {'P','r','i','n','t','e','r','D','r','i', - 'v','e','r','D','a','t','a',0}; -static const WCHAR Separator_FileW[] = {'S','e','p','a','r','a','t','o','r',' ','F', - 'i','l','e',0}; +static const WCHAR Previous_NamesW[] = {'P','r','e','v','i','o','u','s',' ','N','a','m','e','s',0}; +static const WCHAR Print_ProcessorW[] = {'P','r','i','n','t',' ','P','r','o','c','e','s','s','o','r',0}; +static const WCHAR Printer_DriverW[] = {'P','r','i','n','t','e','r',' ','D','r','i','v','e','r',0}; +static const WCHAR PrinterDriverDataW[] = {'P','r','i','n','t','e','r','D','r','i','v','e','r','D','a','t','a',0}; +static const WCHAR ProviderW[] = {'P','r','o','v','i','d','e','r',0}; +static const WCHAR Separator_FileW[] = {'S','e','p','a','r','a','t','o','r',' ','F','i','l','e',0}; static const WCHAR Share_NameW[] = {'S','h','a','r','e',' ','N','a','m','e',0}; static const WCHAR WinPrintW[] = {'W','i','n','P','r','i','n','t',0}; static const WCHAR deviceW[] = {'d','e','v','i','c','e',0}; @@ -4523,6 +4522,79 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } + if (Level == 3 ) { + RegCloseKey(hkeyDriver); + TRACE("buffer space %d required %d\n", cbBuf, *pcbNeeded); + return TRUE; + } + + /* .pszzPreviousNames */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, Previous_NamesW, strPtr, 0, &size, unicode)) { + *pcbNeeded += size; + if(*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, Previous_NamesW, strPtr, size, &size, unicode); + + if (di) di->pszzPreviousNames = (LPWSTR)strPtr; + strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; + } + + if (Level == 4 ) { + RegCloseKey(hkeyDriver); + TRACE("buffer space %d required %d\n", cbBuf, *pcbNeeded); + return TRUE; + } + + /* support is missing, but not important enough for a FIXME */ + TRACE("%s: DriverDate + DriverVersion not supported\n", debugstr_w(DriverName)); + + /* .pszMfgName */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, ManufacturerW, strPtr, 0, &size, unicode)) { + *pcbNeeded += size; + if(*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, ManufacturerW, strPtr, size, &size, unicode); + + if (di) di->pszMfgName = (LPWSTR)strPtr; + strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; + } + + /* .pszOEMUrl */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, OEM_UrlW, strPtr, 0, &size, unicode)) { + *pcbNeeded += size; + if(*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, OEM_UrlW, strPtr, size, &size, unicode); + + if (di) di->pszOEMUrl = (LPWSTR)strPtr; + strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; + } + + /* .pszHardwareID */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, HardwareIDW, strPtr, 0, &size, unicode)) { + *pcbNeeded += size; + if(*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, HardwareIDW, strPtr, size, &size, unicode); + + if (di) di->pszHardwareID = (LPWSTR)strPtr; + strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; + } + + /* .pszProvider */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, ProviderW, strPtr, 0, &size, unicode)) { + *pcbNeeded += size; + if(*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, ProviderW, strPtr, size, &size, unicode); + + if (di) di->pszProvider = (LPWSTR)strPtr; + strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; + } + + if (Level == 6 ) { + RegCloseKey(hkeyDriver); + return TRUE; + } + + /* support is missing, but not important enough for a FIXME */ + TRACE("level 8: incomplete\n"); + TRACE("buffer space %d required %d\n", cbBuf, *pcbNeeded); RegCloseKey(hkeyDriver); return TRUE;
[View Less]
1
0
0
0
Detlef Riekenberg : winspool: Return the full path in DRIVER_INFO_2 and 3.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 7a2c4fb1df1b439094e3b4aec20adf7590c5afeb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a2c4fb1df1b439094e3b4aec…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jul 26 23:24:31 2007 +0200 winspool: Return the full path in DRIVER_INFO_2 and 3. --- dlls/winspool.drv/info.c | 84 +++++++++++++++++++++++----------------------- 1 files changed, 42 insertions(+), 42 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/
…
[View More]
winspool.drv/info.c index 0c735d3..d00afc5 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -4451,75 +4451,75 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL; } - if(WINSPOOL_GetStringFromReg(hkeyDriver, Data_FileW, strPtr, 0, &size, - unicode)) { + /* .pDataFile: For postscript-drivers, this is the ppd-file */ + if (get_filename_from_reg(hkeyDriver, driverdir, dirlen, Data_FileW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, Data_FileW, strPtr, size, - &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_2W) ptr)->pDataFile = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + get_filename_from_reg(hkeyDriver, driverdir, dirlen, Data_FileW, strPtr, size, &size, unicode); + + if (di) di->pDataFile = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } - if(WINSPOOL_GetStringFromReg(hkeyDriver, Configuration_FileW, strPtr, - 0, &size, unicode)) { + /* .pConfigFile is the Driver user Interface */ + if (get_filename_from_reg(hkeyDriver, driverdir, dirlen, Configuration_FileW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, Configuration_FileW, strPtr, - size, &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_2W) ptr)->pConfigFile = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + get_filename_from_reg(hkeyDriver, driverdir, dirlen, Configuration_FileW, strPtr, size, &size, unicode); + + if (di) di->pConfigFile = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } - if(Level == 2 ) { + if (Level == 2 ) { RegCloseKey(hkeyDriver); TRACE("buffer space %d required %d\n", cbBuf, *pcbNeeded); return TRUE; } - if (Level != 5 && WINSPOOL_GetStringFromReg(hkeyDriver, Help_FileW, strPtr, 0, &size, - unicode)) { + if (Level == 5 ) { + RegCloseKey(hkeyDriver); + FIXME("level 5: incomplete\n"); + return TRUE; + } + + /* .pHelpFile */ + if (get_filename_from_reg(hkeyDriver, driverdir, dirlen, Help_FileW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, Help_FileW, strPtr, - size, &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_3W) ptr)->pHelpFile = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + get_filename_from_reg(hkeyDriver, driverdir, dirlen, Help_FileW, strPtr, size, &size, unicode); + + if (di) di->pHelpFile = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } - if (Level != 5 && WINSPOOL_GetStringFromReg(hkeyDriver, Dependent_FilesW, strPtr, 0, - &size, unicode)) { + /* .pDependentFiles */ + if (get_filename_from_reg(hkeyDriver, driverdir, dirlen, Dependent_FilesW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, Dependent_FilesW, strPtr, - size, &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_3W) ptr)->pDependentFiles = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + get_filename_from_reg(hkeyDriver, driverdir, dirlen, Dependent_FilesW, strPtr, size, &size, unicode); + + if (di) di->pDependentFiles = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } - if (Level != 5 && WINSPOOL_GetStringFromReg(hkeyDriver, MonitorW, strPtr, 0, &size, - unicode)) { + /* .pMonitorName is the optional Language Monitor */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, MonitorW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, MonitorW, strPtr, - size, &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_3W) ptr)->pMonitorName = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + WINSPOOL_GetStringFromReg(hkeyDriver, MonitorW, strPtr, size, &size, unicode); + + if (di) di->pMonitorName = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; } - if (Level != 5 && WINSPOOL_GetStringFromReg(hkeyDriver, DatatypeW, strPtr, 0, &size, - unicode)) { + /* .pDefaultDataType */ + if (WINSPOOL_GetStringFromReg(hkeyDriver, DatatypeW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, DatatypeW, strPtr, - size, &tmp, unicode); - if(ptr) - ((PDRIVER_INFO_3W) ptr)->pDefaultDataType = (LPWSTR)strPtr; + WINSPOOL_GetStringFromReg(hkeyDriver, DatatypeW, strPtr, size, &size, unicode); + + if (di) di->pDefaultDataType = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? pDriverStrings + (*pcbNeeded) : NULL; }
[View Less]
1
0
0
0
Detlef Riekenberg : winspool: Enable all levels for EnumPrinterDrivers + GetPrinterDriver.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: a2daf754c2fb869fa881a04ac0b521d368b6cb3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2daf754c2fb869fa881a04ac…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jul 26 23:14:55 2007 +0200 winspool: Enable all levels for EnumPrinterDrivers + GetPrinterDriver. --- dlls/winspool.drv/info.c | 54 ++++++++++----------------------------------- 1 files changed, 12 insertions(+), 42 deletions(-) diff --git a/dlls/winspool.drv/info.
…
[View More]
c b/dlls/winspool.drv/info.c index 9e4414b..0c735d3 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -245,6 +245,10 @@ static const WCHAR LPR_Port[] = {'L','P','R',':',0}; static const WCHAR default_doc_title[] = {'L','o','c','a','l',' ','D','o','w','n','l','e','v','e','l',' ', 'D','o','c','u','m','e','n','t',0}; +static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W), + sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W), + sizeof(DRIVER_INFO_5W), sizeof(DRIVER_INFO_6W), + 0, sizeof(DRIVER_INFO_8W)}; /****************************************************************** * validate the user-supplied printing-environment [internal] @@ -4371,6 +4375,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( debugstr_w(DriverName), env, Level, di, pDriverStrings, cbBuf, unicode); + if (di) ZeroMemory(di, di_sizeof[Level]); + if (unicode) { *pcbNeeded = (lstrlenW(DriverName) + 1) * sizeof(WCHAR); if (*pcbNeeded <= cbBuf) @@ -4540,14 +4546,13 @@ static BOOL WINSPOOL_GetPrinterDriver(HANDLE hPrinter, LPCWSTR pEnvironment, TRACE("(%p,%s,%d,%p,%d,%p)\n",hPrinter,debugstr_w(pEnvironment), Level,pDriverInfo,cbBuf, pcbNeeded); - ZeroMemory(pDriverInfo, cbBuf); if (!(name = get_opened_printer_name(hPrinter))) { SetLastError(ERROR_INVALID_HANDLE); return FALSE; } - if(Level < 1 || Level > 6) { + if (Level < 1 || Level == 7 || Level > 8) { SetLastError(ERROR_INVALID_LEVEL); return FALSE; } @@ -4584,36 +4589,12 @@ static BOOL WINSPOOL_GetPrinterDriver(HANDLE hPrinter, LPCWSTR pEnvironment, return FALSE; } - switch(Level) { - case 1: - size = sizeof(DRIVER_INFO_1W); - break; - case 2: - size = sizeof(DRIVER_INFO_2W); - break; - case 3: - size = sizeof(DRIVER_INFO_3W); - break; - case 4: - size = sizeof(DRIVER_INFO_4W); - break; - case 5: - size = sizeof(DRIVER_INFO_5W); - break; - case 6: - size = sizeof(DRIVER_INFO_6W); - break; - default: - ERR("Invalid level\n"); - return FALSE; - } - - if(size <= cbBuf) + size = di_sizeof[Level]; + if ((size <= cbBuf) && pDriverInfo) ptr = pDriverInfo + size; if(!WINSPOOL_GetDriverInfoFromReg(hkeyDrivers, DriverName, - env, Level, pDriverInfo, - (cbBuf < size) ? NULL : ptr, + env, Level, pDriverInfo, ptr, (cbBuf < size) ? 0 : cbBuf - size, &needed, unicode)) { RegCloseKey(hkeyDrivers); @@ -5044,8 +5025,7 @@ static BOOL WINSPOOL_EnumPrinterDrivers(LPWSTR pName, LPCWSTR pEnvironment, if (!env) return FALSE; /* SetLastError() is in validate_envW */ /* check input parameter */ - if((Level < 1) || (Level > 3)) { - ERR("unsupported level %d\n", Level); + if ((Level < 1) || (Level == 7) || (Level > 8)) { SetLastError(ERROR_INVALID_LEVEL); return FALSE; } @@ -5073,17 +5053,7 @@ static BOOL WINSPOOL_EnumPrinterDrivers(LPWSTR pName, LPCWSTR pEnvironment, /* get size of single struct * unicode and ascii structure have the same size */ - switch (Level) { - case 1: - size = sizeof(DRIVER_INFO_1A); - break; - case 2: - size = sizeof(DRIVER_INFO_2A); - break; - case 3: - size = sizeof(DRIVER_INFO_3A); - break; - } + size = di_sizeof[Level]; /* calculate required buffer size */ *pcbNeeded = size * number;
[View Less]
1
0
0
0
Detlef Riekenberg : winspool: Return the full path for the driver.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 4b53154f361b9fdc504be5e099e84c6686f940fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b53154f361b9fdc504be5e09…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jul 26 23:05:27 2007 +0200 winspool: Return the full path for the driver. --- dlls/winspool.drv/info.c | 137 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 129 insertions(+), 8 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/
…
[View More]
info.c index ffe729f..9e4414b 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -200,6 +200,7 @@ static const WCHAR Version3_SubdirW[] = {'\\','3',0}; static const WCHAR spooldriversW[] = {'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\',0}; static const WCHAR spoolprtprocsW[] = {'\\','s','p','o','o','l','\\','p','r','t','p','r','o','c','s','\\',0}; +static const WCHAR backslashW[] = {'\\',0}; static const WCHAR Configuration_FileW[] = {'C','o','n','f','i','g','u','r','a','t', 'i','o','n',' ','F','i','l','e',0}; static const WCHAR DatatypeW[] = {'D','a','t','a','t','y','p','e',0}; @@ -3416,6 +3417,112 @@ static DWORD WINSPOOL_GetDWORDFromReg(HKEY hkey, LPCSTR ValueName) return value; } + +/***************************************************************************** + * get_filename_from_reg [internal] + * + * Get ValueName from hkey storing result in out + * when the Value in the registry has only a filename, use driverdir as prefix + * outlen is space left in out + * String is stored either as unicode or ascii + * + */ + +static BOOL get_filename_from_reg(HKEY hkey, LPCWSTR driverdir, DWORD dirlen, LPCWSTR ValueName, + LPBYTE out, DWORD outlen, LPDWORD needed, BOOL unicode) +{ + WCHAR filename[MAX_PATH]; + DWORD size; + DWORD type; + LONG ret; + LPWSTR buffer = filename; + LPWSTR ptr; + + *needed = 0; + size = sizeof(filename); + buffer[0] = '\0'; + ret = RegQueryValueExW(hkey, ValueName, NULL, &type, (LPBYTE) buffer, &size); + if (ret == ERROR_MORE_DATA) { + TRACE("need dynamic buffer: %u\n", size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); + if (!buffer) { + /* No Memory is bad */ + return FALSE; + } + buffer[0] = '\0'; + ret = RegQueryValueExW(hkey, ValueName, NULL, &type, (LPBYTE) buffer, &size); + } + + if ((ret != ERROR_SUCCESS) || (!buffer[0])) { + if (buffer != filename) HeapFree(GetProcessHeap(), 0, buffer); + return FALSE; + } + + ptr = buffer; + while (ptr) { + /* do we have a full path ? */ + ret = (((buffer[0] == '\\') && (buffer[1] == '\\')) || + (buffer[0] && (buffer[1] == ':') && (buffer[2] == '\\')) ); + + if (!ret) { + /* we must build the full Path */ + *needed += dirlen; + if ((out) && (outlen > dirlen)) { + if (unicode) { + lstrcpyW((LPWSTR)out, driverdir); + } + else + { + WideCharToMultiByte(CP_ACP, 0, driverdir, -1, (LPSTR)out, outlen, NULL, NULL); + } + out += dirlen; + outlen -= dirlen; + } + else + out = NULL; + } + + /* write the filename */ + if (unicode) { + size = (lstrlenW(ptr) + 1) * sizeof(WCHAR); + if ((out) && (outlen >= size)) { + lstrcpyW((LPWSTR)out, ptr); + out += size; + outlen -= size; + } + else + out = NULL; + } + else + { + size = WideCharToMultiByte(CP_ACP, 0, ptr, -1, NULL, 0, NULL, NULL); + if ((out) && (outlen >= size)) { + WideCharToMultiByte(CP_ACP, 0, ptr, -1, (LPSTR)out, outlen, NULL, NULL); + out += size; + outlen -= size; + } + else + out = NULL; + } + *needed += size; + ptr += lstrlenW(ptr)+1; + if ((type != REG_MULTI_SZ) || (!ptr[0])) ptr = NULL; + } + + if (buffer != filename) HeapFree(GetProcessHeap(), 0, buffer); + + /* write the multisz-termination */ + if (type == REG_MULTI_SZ) { + size = (unicode) ? sizeof(WCHAR) : 1; + + *needed += size; + if (out && (outlen >= size)) { + memset (out, 0, size); + } + } + return TRUE; +} + /***************************************************************************** * WINSPOOL_GetStringFromReg * @@ -4255,6 +4362,8 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( { DWORD size, tmp; HKEY hkeyDriver; + WCHAR driverdir[MAX_PATH]; + DWORD dirlen; LPBYTE strPtr = pDriverStrings; LPDRIVER_INFO_8W di = (LPDRIVER_INFO_8W) ptr; @@ -4287,6 +4396,19 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL; } + /* Reserve Space for the largest subdir and a Backslash*/ + size = sizeof(driverdir) - sizeof(Version3_SubdirW) - sizeof(WCHAR); + if (!GetPrinterDriverDirectoryW(NULL, (LPWSTR) env->envname, 1, (LPBYTE) driverdir, size, &size)) { + /* Should never Fail */ + return FALSE; + } + lstrcatW(driverdir, env->versionsubdir); + lstrcatW(driverdir, backslashW); + + /* dirlen must not include the terminating zero */ + dirlen = (unicode) ? lstrlenW(driverdir) * sizeof(WCHAR) : + WideCharToMultiByte(CP_ACP, 0, driverdir, -1, NULL, 0, NULL, NULL) -1; + if (!DriverName[0] || RegOpenKeyW(hkeyDrivers, DriverName, &hkeyDriver) != ERROR_SUCCESS) { ERR("Can't find driver %s in registry\n", debugstr_w(DriverName)); SetLastError(ERROR_UNKNOWN_PRINTER_DRIVER); /* ? */ @@ -4312,15 +4434,14 @@ static BOOL WINSPOOL_GetDriverInfoFromReg( strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL; } - - if(WINSPOOL_GetStringFromReg(hkeyDriver, DriverW, strPtr, 0, &size, - unicode)) { + /* .pDriverPath is the Graphics rendering engine. + The full Path is required to avoid a crash in some apps */ + if (get_filename_from_reg(hkeyDriver, driverdir, dirlen, DriverW, strPtr, 0, &size, unicode)) { *pcbNeeded += size; - if(*pcbNeeded <= cbBuf) - WINSPOOL_GetStringFromReg(hkeyDriver, DriverW, strPtr, size, &tmp, - unicode); - if(ptr) - ((PDRIVER_INFO_2W) ptr)->pDriverPath = (LPWSTR)strPtr; + if (*pcbNeeded <= cbBuf) + get_filename_from_reg(hkeyDriver, driverdir, dirlen, DriverW, strPtr, size, &tmp, unicode); + + if (di) di->pDriverPath = (LPWSTR)strPtr; strPtr = (pDriverStrings) ? (pDriverStrings + (*pcbNeeded)) : NULL; }
[View Less]
1
0
0
0
Detlef Riekenberg : winspool: Use correct path for 16bit drivers.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 36a6515d4e9b6c97838b1d58d2bd090dd274ba2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36a6515d4e9b6c97838b1d58d…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Jul 26 22:54:14 2007 +0200 winspool: Use correct path for 16bit drivers. --- dlls/winspool.drv/info.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index f5ed7ef..ffe729f 100644 --- a/
…
[View More]
dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -192,6 +192,8 @@ static const WCHAR envname_win40W[] = {'W','i','n','d','o','w','s',' ','4','.',' static const WCHAR envname_x86W[] = {'W','i','n','d','o','w','s',' ','N','T',' ','x','8','6',0}; static const WCHAR subdir_win40W[] = {'w','i','n','4','0',0}; static const WCHAR subdir_x86W[] = {'w','3','2','x','8','6',0}; +static const WCHAR Version0_RegPathW[] = {'\\','V','e','r','s','i','o','n','-','0',0}; +static const WCHAR Version0_SubdirW[] = {'\\','0',0}; static const WCHAR Version3_RegPathW[] = {'\\','V','e','r','s','i','o','n','-','3',0}; static const WCHAR Version3_SubdirW[] = {'\\','3',0}; @@ -264,7 +266,8 @@ static const printenv_t * validate_envW(LPCWSTR env) static const printenv_t env_x86 = {envname_x86W, subdir_x86W, 3, Version3_RegPathW, Version3_SubdirW}; static const printenv_t env_win40 = {envname_win40W, subdir_win40W, - 0, emptyStringW, emptyStringW}; + 0, Version0_RegPathW, Version0_SubdirW}; + static const printenv_t * const all_printenv[]={&env_x86, &env_win40}; const printenv_t *result = NULL;
[View Less]
1
0
0
0
Misha Koshelev : urlmon/tests: Make http protocol tests refractory to timing issues.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 0a9dfa0d27fa9da5ca8a2f4a87505d61e995abc4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a9dfa0d27fa9da5ca8a2f4a8…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri Jul 27 00:44:33 2007 -0500 urlmon/tests: Make http protocol tests refractory to timing issues. --- dlls/urlmon/tests/protocol.c | 220 +++++++++++++++++++----------------------- 1 files changed, 98 insertions(+), 122 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0a9dfa0d27fa9da5ca8a2…
1
0
0
0
Misha Koshelev : urlmon/tests: Rename received_data event to more general name event_complete.
by Alexandre Julliard
27 Jul '07
27 Jul '07
Module: wine Branch: master Commit: 9f31fb2fd466ed0098f34c6558283023cf5fdd86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f31fb2fd466ed0098f34c655…
Author: Misha Koshelev <mk144210(a)bcm.edu> Date: Fri Jul 27 00:39:17 2007 -0500 urlmon/tests: Rename received_data event to more general name event_complete. --- dlls/urlmon/tests/protocol.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/
…
[View More]
protocol.c index 45ba841..2b79cdd 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -104,7 +104,7 @@ static int state = 0; static DWORD bindf = 0; static IInternetBindInfo *prot_bind_info; static void *expect_pv; -static HANDLE received_data; +static HANDLE event_complete; static enum { FILE_TEST, @@ -419,7 +419,7 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR } if (!(bindf & BINDF_FROMURLMON)) - SetEvent(received_data); + SetEvent(event_complete); } return S_OK; } @@ -1250,7 +1250,7 @@ static void test_http_protocol_url(LPCWSTR url, BOOL is_first) } else { - WaitForSingleObject(received_data, INFINITE); + WaitForSingleObject(event_complete, INFINITE); SendMessage(protocol_hwnd, WM_USER, 0, 0); } @@ -1299,7 +1299,7 @@ static HRESULT http_protocol_read(void) hres = IInternetProtocol_Read(http_protocol, buf, sizeof(buf), &cb); if(!(bindf & BINDF_FROMURLMON) && hres == E_PENDING) { - WaitForSingleObject(received_data, INFINITE); + WaitForSingleObject(event_complete, INFINITE); CHECK_CALLED(ReportData); SET_EXPECT(ReportData); } else if(cb == 0) break; @@ -1554,7 +1554,7 @@ START_TEST(protocol) { OleInitialize(NULL); - received_data = CreateEvent(NULL, FALSE, FALSE, NULL); + event_complete = CreateEvent(NULL, FALSE, FALSE, NULL); protocol_hwnd = create_protocol_window(); test_file_protocol(); @@ -1563,7 +1563,7 @@ START_TEST(protocol) test_CreateBinding(); DestroyWindow(protocol_hwnd); - CloseHandle(received_data); + CloseHandle(event_complete); OleUninitialize(); }
[View Less]
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200