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
June 2008
----- 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
944 discussions
Start a n
N
ew thread
Hans Leidekker : wininet: Only reconnect when redirected to an external site.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: bdf311f91fb2dc05d94e625b9773c92f4d6aadd2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdf311f91fb2dc05d94e625b9…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:03:39 2008 +0200 wininet: Only reconnect when redirected to an external site. --- dlls/wininet/http.c | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index fdfd9da..5e527a1 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1329,8 +1329,6 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr) char szaddr[32]; LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; - if (lpwhs->socketAddress.sin_addr.s_addr) return TRUE; - INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_RESOLVING_NAME, lpwhs->lpszServerName, @@ -3019,17 +3017,16 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl) if (!using_proxy) { - HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); - lpwhs->lpszServerName = WININET_strdupW(hostName); - lpwhs->nServerPort = urlComponents.nPort; - - if (!HTTP_ResolveName(lpwhr)) - return FALSE; - - NETCON_close(&lpwhr->netConnection); + if (strcmpiW(lpwhs->lpszServerName, hostName) || lpwhs->nServerPort != urlComponents.nPort) + { + HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); + lpwhs->lpszServerName = WININET_strdupW(hostName); + lpwhs->nServerPort = urlComponents.nPort; - if (!NETCON_init(&lpwhr->netConnection,lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) - return FALSE; + NETCON_close(&lpwhr->netConnection); + if (!HTTP_ResolveName(lpwhr)) return FALSE; + if (!NETCON_init(&lpwhr->netConnection, lpwhr->hdr.dwFlags & INTERNET_FLAG_SECURE)) return FALSE; + } } else TRACE("Redirect through proxy\n");
1
0
0
0
Hans Leidekker : wininet: Allocate buffers in InternetCrackUrlA.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: fdc82adfccc59a4c44231385ec534e1b19b8d9a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdc82adfccc59a4c44231385e…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:03:15 2008 +0200 wininet: Allocate buffers in InternetCrackUrlA. --- dlls/wininet/internet.c | 139 +++++++++++++++++++++++++++++++---------------- 1 files changed, 91 insertions(+), 48 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 0ae500e..ce5da56 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -1050,14 +1050,14 @@ BOOL WINAPI InternetCloseHandle(HINTERNET hInternet) /*********************************************************************** * ConvertUrlComponentValue (Internal) * - * Helper function for InternetCrackUrlW + * Helper function for InternetCrackUrlA * */ static void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, LPWSTR lpwszComponent, DWORD dwwComponentLen, LPCSTR lpszStart, LPCWSTR lpwszStart) { - TRACE("%p %d %p %d %p %p\n", lppszComponent, *dwComponentLen, lpwszComponent, dwwComponentLen, lpszStart, lpwszStart); + TRACE("%p %d %p %d %p %p\n", *lppszComponent, *dwComponentLen, lpwszComponent, dwwComponentLen, lpszStart, lpwszStart); if (*dwComponentLen != 0) { DWORD nASCIILength=WideCharToMultiByte(CP_ACP,0,lpwszComponent,dwwComponentLen,NULL,0,NULL,NULL); @@ -1091,9 +1091,13 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, { DWORD nLength; URL_COMPONENTSW UCW; - WCHAR* lpwszUrl; + BOOL ret = FALSE; + WCHAR *lpwszUrl, *hostname = NULL, *username = NULL, *password = NULL, *path = NULL, + *scheme = NULL, *extra = NULL; - TRACE("(%s %u %x %p)\n", debugstr_a(lpszUrl), dwUrlLength, dwFlags, lpUrlComponents); + TRACE("(%s %u %x %p)\n", + lpszUrl ? debugstr_an(lpszUrl, dwUrlLength ? dwUrlLength : strlen(lpszUrl)) : "(null)", + dwUrlLength, dwFlags, lpUrlComponents); if (!lpszUrl || !*lpszUrl || !lpUrlComponents || lpUrlComponents->dwStructSize != sizeof(URL_COMPONENTSA)) @@ -1115,53 +1119,92 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, memset(&UCW,0,sizeof(UCW)); UCW.dwStructSize = sizeof(URL_COMPONENTSW); - if(lpUrlComponents->dwHostNameLength!=0) - UCW.dwHostNameLength= lpUrlComponents->dwHostNameLength; - if(lpUrlComponents->dwUserNameLength!=0) - UCW.dwUserNameLength=lpUrlComponents->dwUserNameLength; - if(lpUrlComponents->dwPasswordLength!=0) - UCW.dwPasswordLength=lpUrlComponents->dwPasswordLength; - if(lpUrlComponents->dwUrlPathLength!=0) - UCW.dwUrlPathLength=lpUrlComponents->dwUrlPathLength; - if(lpUrlComponents->dwSchemeLength!=0) - UCW.dwSchemeLength=lpUrlComponents->dwSchemeLength; - if(lpUrlComponents->dwExtraInfoLength!=0) - UCW.dwExtraInfoLength=lpUrlComponents->dwExtraInfoLength; - if(!InternetCrackUrlW(lpwszUrl,nLength,dwFlags,&UCW)) + if (lpUrlComponents->dwHostNameLength) { - HeapFree(GetProcessHeap(), 0, lpwszUrl); - return FALSE; + UCW.dwHostNameLength = lpUrlComponents->dwHostNameLength; + if (lpUrlComponents->lpszHostName) + { + hostname = HeapAlloc(GetProcessHeap(), 0, UCW.dwHostNameLength * sizeof(WCHAR)); + UCW.lpszHostName = hostname; + } + } + if (lpUrlComponents->dwUserNameLength) + { + UCW.dwUserNameLength = lpUrlComponents->dwUserNameLength; + if (lpUrlComponents->lpszUserName) + { + username = HeapAlloc(GetProcessHeap(), 0, UCW.dwUserNameLength * sizeof(WCHAR)); + UCW.lpszUserName = username; + } + } + if (lpUrlComponents->dwPasswordLength) + { + UCW.dwPasswordLength = lpUrlComponents->dwPasswordLength; + if (lpUrlComponents->lpszPassword) + { + password = HeapAlloc(GetProcessHeap(), 0, UCW.dwPasswordLength * sizeof(WCHAR)); + UCW.lpszPassword = password; + } + } + if (lpUrlComponents->dwUrlPathLength) + { + UCW.dwUrlPathLength = lpUrlComponents->dwUrlPathLength; + if (lpUrlComponents->lpszUrlPath) + { + path = HeapAlloc(GetProcessHeap(), 0, UCW.dwUrlPathLength * sizeof(WCHAR)); + UCW.lpszUrlPath = path; + } + } + if (lpUrlComponents->dwSchemeLength) + { + UCW.dwSchemeLength = lpUrlComponents->dwSchemeLength; + if (lpUrlComponents->lpszScheme) + { + scheme = HeapAlloc(GetProcessHeap(), 0, UCW.dwSchemeLength * sizeof(WCHAR)); + UCW.lpszScheme = scheme; + } + } + if (lpUrlComponents->dwExtraInfoLength) + { + UCW.dwExtraInfoLength = lpUrlComponents->dwExtraInfoLength; + if (lpUrlComponents->lpszExtraInfo) + { + extra = HeapAlloc(GetProcessHeap(), 0, UCW.dwExtraInfoLength * sizeof(WCHAR)); + UCW.lpszExtraInfo = extra; + } + } + if ((ret = InternetCrackUrlW(lpwszUrl, nLength, dwFlags, &UCW))) + { + ConvertUrlComponentValue(&lpUrlComponents->lpszHostName, &lpUrlComponents->dwHostNameLength, + UCW.lpszHostName, UCW.dwHostNameLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszUserName, &lpUrlComponents->dwUserNameLength, + UCW.lpszUserName, UCW.dwUserNameLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszPassword, &lpUrlComponents->dwPasswordLength, + UCW.lpszPassword, UCW.dwPasswordLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszUrlPath, &lpUrlComponents->dwUrlPathLength, + UCW.lpszUrlPath, UCW.dwUrlPathLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszScheme, &lpUrlComponents->dwSchemeLength, + UCW.lpszScheme, UCW.dwSchemeLength, lpszUrl, lpwszUrl); + ConvertUrlComponentValue(&lpUrlComponents->lpszExtraInfo, &lpUrlComponents->dwExtraInfoLength, + UCW.lpszExtraInfo, UCW.dwExtraInfoLength, lpszUrl, lpwszUrl); + + lpUrlComponents->nScheme = UCW.nScheme; + lpUrlComponents->nPort = UCW.nPort; + + TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", lpszUrl, + debugstr_an(lpUrlComponents->lpszScheme, lpUrlComponents->dwSchemeLength), + debugstr_an(lpUrlComponents->lpszHostName, lpUrlComponents->dwHostNameLength), + debugstr_an(lpUrlComponents->lpszUrlPath, lpUrlComponents->dwUrlPathLength), + debugstr_an(lpUrlComponents->lpszExtraInfo, lpUrlComponents->dwExtraInfoLength)); } - - ConvertUrlComponentValue(&lpUrlComponents->lpszHostName, &lpUrlComponents->dwHostNameLength, - UCW.lpszHostName, UCW.dwHostNameLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszUserName, &lpUrlComponents->dwUserNameLength, - UCW.lpszUserName, UCW.dwUserNameLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszPassword, &lpUrlComponents->dwPasswordLength, - UCW.lpszPassword, UCW.dwPasswordLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszUrlPath, &lpUrlComponents->dwUrlPathLength, - UCW.lpszUrlPath, UCW.dwUrlPathLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszScheme, &lpUrlComponents->dwSchemeLength, - UCW.lpszScheme, UCW.dwSchemeLength, - lpszUrl, lpwszUrl); - ConvertUrlComponentValue(&lpUrlComponents->lpszExtraInfo, &lpUrlComponents->dwExtraInfoLength, - UCW.lpszExtraInfo, UCW.dwExtraInfoLength, - lpszUrl, lpwszUrl); - lpUrlComponents->nScheme=UCW.nScheme; - lpUrlComponents->nPort=UCW.nPort; HeapFree(GetProcessHeap(), 0, lpwszUrl); - - TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", lpszUrl, - debugstr_an(lpUrlComponents->lpszScheme,lpUrlComponents->dwSchemeLength), - debugstr_an(lpUrlComponents->lpszHostName,lpUrlComponents->dwHostNameLength), - debugstr_an(lpUrlComponents->lpszUrlPath,lpUrlComponents->dwUrlPathLength), - debugstr_an(lpUrlComponents->lpszExtraInfo,lpUrlComponents->dwExtraInfoLength)); - - return TRUE; + HeapFree(GetProcessHeap(), 0, hostname); + HeapFree(GetProcessHeap(), 0, username); + HeapFree(GetProcessHeap(), 0, password); + HeapFree(GetProcessHeap(), 0, path); + HeapFree(GetProcessHeap(), 0, scheme); + HeapFree(GetProcessHeap(), 0, extra); + return ret; } static const WCHAR url_schemes[][7] =
1
0
0
0
Hans Leidekker : wininet: Don' t assume URL is null-terminated in InternetCrackUrlW.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: c35a0428f65715f10372ee42e6d63698ad51edc0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c35a0428f65715f10372ee42e…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:02:27 2008 +0200 wininet: Don't assume URL is null-terminated in InternetCrackUrlW. --- dlls/wininet/internet.c | 49 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 34 insertions(+), 15 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index fb71de4..0ae500e 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -1268,10 +1268,10 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR LPCWSTR lpszcp = NULL; LPWSTR lpszUrl_decode = NULL; DWORD dwUrlLength = dwUrlLength_orig; - const WCHAR lpszSeparators[3]={';','?',0}; - const WCHAR lpszSlash[2]={'/',0}; - TRACE("(%s %u %x %p)\n", debugstr_w(lpszUrl), dwUrlLength, dwFlags, lpUC); + TRACE("(%s %u %x %p)\n", + lpszUrl ? debugstr_wn(lpszUrl, dwUrlLength ? dwUrlLength : strlenW(lpszUrl)) : "(null)", + dwUrlLength, dwFlags, lpUC); if (!lpszUrl_orig || !*lpszUrl_orig || !lpUC) { @@ -1282,16 +1282,33 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR if (dwFlags & ICU_DECODE) { - lpszUrl_decode=HeapAlloc( GetProcessHeap(), 0, dwUrlLength * sizeof (WCHAR) ); - if( InternetCanonicalizeUrlW(lpszUrl_orig, lpszUrl_decode, &dwUrlLength, dwFlags)) - { - lpszUrl = lpszUrl_decode; - } + WCHAR *url_tmp; + DWORD len = dwUrlLength + 1; + + if (!(url_tmp = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + memcpy(url_tmp, lpszUrl_orig, dwUrlLength * sizeof(WCHAR)); + url_tmp[dwUrlLength] = 0; + if (!(lpszUrl_decode = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) + { + HeapFree(GetProcessHeap(), 0, url_tmp); + INTERNET_SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + if (InternetCanonicalizeUrlW(url_tmp, lpszUrl_decode, &len, ICU_DECODE | ICU_NO_ENCODE)) + { + dwUrlLength = len; + lpszUrl = lpszUrl_decode; + } + HeapFree(GetProcessHeap(), 0, url_tmp); } lpszap = lpszUrl; /* Determine if the URI is absolute. */ - while (*lpszap != '\0') + while (lpszap - lpszUrl < dwUrlLength) { if (isalnumW(*lpszap)) { @@ -1315,7 +1332,9 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR lpUC->nPort = INTERNET_INVALID_PORT_NUMBER; /* Parse <params> */ - lpszParam = strpbrkW(lpszap, lpszSeparators); + if (!(lpszParam = memchrW(lpszap, ';', dwUrlLength - (lpszap - lpszUrl)))) + lpszParam = memchrW(lpszap, '?', dwUrlLength - (lpszap - lpszUrl)); + SetUrlComponentValueW(&lpUC->lpszExtraInfo, &lpUC->dwExtraInfoLength, lpszParam, lpszParam ? dwUrlLength-(lpszParam-lpszUrl) : 0); @@ -1336,7 +1355,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR { lpszcp += 2; - lpszNetLoc = strpbrkW(lpszcp, lpszSlash); + lpszNetLoc = memchrW(lpszcp, '/', dwUrlLength - (lpszcp - lpszUrl)); if (lpszParam) { if (lpszNetLoc) @@ -1356,7 +1375,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR /* [<user>[<:password>]@]<host>[:<port>] */ /* First find the user and password if they exist */ - lpszHost = strchrW(lpszcp, '@'); + lpszHost = memchrW(lpszcp, '@', dwUrlLength - (lpszcp - lpszUrl)); if (lpszHost == NULL || lpszHost > lpszNetLoc) { /* username and password not specified. */ @@ -1465,7 +1484,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR * <protocol>:[//<net_loc>][/path][;<params>][?<query>][#<fragment>] * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ - if (lpszcp != 0 && *lpszcp != '\0' && (!lpszParam || lpszcp < lpszParam)) + if (lpszcp != 0 && lpszcp - lpszUrl < dwUrlLength && (!lpszParam || lpszcp < lpszParam)) { INT len; @@ -1479,7 +1498,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR /* Leave the parameter list in lpszUrlPath. Strip off any trailing * newlines if necessary. */ - LPWSTR lpsznewline = strchrW(lpszcp, '\n'); + LPWSTR lpsznewline = memchrW(lpszcp, '\n', dwUrlLength - (lpszcp - lpszUrl)); if (lpsznewline != NULL) len = lpsznewline - lpszcp; else @@ -1592,7 +1611,7 @@ BOOL WINAPI InternetCanonicalizeUrlW(LPCWSTR lpszUrl, LPWSTR lpszBuffer, DWORD dwURLFlags = URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE; TRACE("(%s, %p, %p, 0x%08x) bufferlength: %d\n", debugstr_w(lpszUrl), lpszBuffer, - lpdwBufferLength, lpdwBufferLength ? *lpdwBufferLength : -1, dwFlags); + lpdwBufferLength, dwFlags, lpdwBufferLength ? *lpdwBufferLength : -1); if(dwFlags & ICU_DECODE) {
1
0
0
0
Hans Leidekker : wininet: More win64 compatibility fixes.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: c3ecb7244b0047b4bfefbc0b4d8ba8cd18fef3af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3ecb7244b0047b4bfefbc0b4…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:02:07 2008 +0200 wininet: More win64 compatibility fixes. --- dlls/wininet/cookie.c | 16 ++++++++-------- include/wininet.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index bd22bc6..12d841b 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -631,10 +631,10 @@ BOOL WINAPI InternetClearAllPerSiteCookieDecisions( VOID ) * * See InternetEnumPerSiteCookieDecisionW. */ -BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long *pcSiteNameSize, - unsigned long *pdwDecision, unsigned long dwIndex ) +BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, ULONG *pcSiteNameSize, + ULONG *pdwDecision, ULONG dwIndex ) { - FIXME("(%s, %p, %p, 0x%08lx) stub\n", + FIXME("(%s, %p, %p, 0x%08x) stub\n", debugstr_a(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex); return FALSE; } @@ -649,10 +649,10 @@ BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long * FALSE on failure * */ -BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned long *pcSiteNameSize, - unsigned long *pdwDecision, unsigned long dwIndex ) +BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, ULONG *pcSiteNameSize, + ULONG *pdwDecision, ULONG dwIndex ) { - FIXME("(%s, %p, %p, 0x%08lx) stub\n", + FIXME("(%s, %p, %p, 0x%08x) stub\n", debugstr_w(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex); return FALSE; } @@ -660,7 +660,7 @@ BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned lon /*********************************************************************** * InternetGetPerSiteCookieDecisionA (WININET.@) */ -BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned long *pResult ) +BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, ULONG *pResult ) { FIXME("(%s, %p) stub\n", debugstr_a(pwchHostName), pResult); return FALSE; @@ -669,7 +669,7 @@ BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned lon /*********************************************************************** * InternetGetPerSiteCookieDecisionW (WININET.@) */ -BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned long *pResult ) +BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, ULONG *pResult ) { FIXME("(%s, %p) stub\n", debugstr_w(pwchHostName), pResult); return FALSE; diff --git a/include/wininet.h b/include/wininet.h index de1aae3..523fb48 100644 --- a/include/wininet.h +++ b/include/wininet.h @@ -1281,8 +1281,8 @@ BOOLAPI HttpQueryInfoW(HINTERNET ,DWORD ,LPVOID ,LPDWORD ,LPDWORD); BOOLAPI InternetClearAllPerSiteCookieDecisions(VOID); -BOOLAPI InternetEnumPerSiteCookieDecisionA(LPSTR,unsigned long *,unsigned long *,unsigned long); -BOOLAPI InternetEnumPerSiteCookieDecisionW(LPWSTR,unsigned long *,unsigned long *,unsigned long); +BOOLAPI InternetEnumPerSiteCookieDecisionA(LPSTR,ULONG *,ULONG *,ULONG); +BOOLAPI InternetEnumPerSiteCookieDecisionW(LPWSTR,ULONG *,ULONG *,ULONG); #define InternetEnumPerSiteCookieDecision WINELIB_NAME_AW(InternetEnumPerSiteCookieDecision) #define INTERNET_COOKIE_IS_SECURE 0x00000001 @@ -1304,8 +1304,8 @@ DWORD WINAPI InternetSetCookieExA(LPCSTR,LPCSTR,LPCSTR,DWORD,DWORD_PTR); DWORD WINAPI InternetSetCookieExW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,DWORD_PTR); #define InternetSetCookieEx WINELIB_NAME_AW(InternetSetCookieEx) -BOOLAPI InternetGetPerSiteCookieDecisionA(LPCSTR,unsigned long *); -BOOLAPI InternetGetPerSiteCookieDecisionW(LPCWSTR,unsigned long *); +BOOLAPI InternetGetPerSiteCookieDecisionA(LPCSTR,ULONG *); +BOOLAPI InternetGetPerSiteCookieDecisionW(LPCWSTR,ULONG *); #define InternetGetPerSiteCookieDecision WINELIB_NAME_AW(InternetGetPerSiteCookieDecision) BOOLAPI InternetSetPerSiteCookieDecisionA(LPCSTR,DWORD);
1
0
0
0
Hans Leidekker : wininet: Avoid a crash on an invalid handle in InternetQueryOption.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 01e21366cb935f8e50aa2bca8a81de117e9ead48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=01e21366cb935f8e50aa2bca8…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:01:45 2008 +0200 wininet: Avoid a crash on an invalid handle in InternetQueryOption. --- dlls/wininet/internet.c | 2 +- dlls/wininet/tests/internet.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 388a2a9..fb71de4 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -1904,7 +1904,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d TRACE("INTERNET_OPTION_USER_AGENT\n"); - if (lpwhh->htype != INTERNET_HANDLE_TYPE_INTERNET) + if (!lpwhh || lpwhh->htype != INTERNET_HANDLE_TYPE_INTERNET) { INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); return FALSE; diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 2f88f58..8eb7cc6 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -150,6 +150,12 @@ static void test_InternetQueryOptionA(void) ok((hinet != 0x0),"InternetOpen Failed\n"); SetLastError(0xdeadbeef); + retval=InternetQueryOptionA(NULL,INTERNET_OPTION_USER_AGENT,NULL,&len); + err=GetLastError(); + ok(retval == 0,"Got wrong return value %d\n",retval); + ok(err == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "Got wrong error code%d\n",err); + + SetLastError(0xdeadbeef); len=strlen(useragent)+1; retval=InternetQueryOptionA(hinet,INTERNET_OPTION_USER_AGENT,NULL,&len); err=GetLastError();
1
0
0
0
Hans Leidekker : wininet: Add a test for InternetCanonicalizeUrl.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: f1dc1bb070ef98d812a5aee0c0a0af64cb74e592 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1dc1bb070ef98d812a5aee0c…
Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:01:20 2008 +0200 wininet: Add a test for InternetCanonicalizeUrl. --- dlls/wininet/tests/internet.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 0f1e845..2f88f58 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -73,6 +73,16 @@ static void test_InternetCanonicalizeUrlA(void) "got %u and %u with size %u for '%s' (%d)\n", res, GetLastError(), dwSize, buffer, lstrlenA(buffer)); + memset(buffer, '#', sizeof(buffer)-1); + buffer[sizeof(buffer)-1] = '\0'; + dwSize = sizeof(buffer); + SetLastError(0xdeadbeef); + res = InternetCanonicalizeUrlA("file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml", buffer, &dwSize, ICU_DECODE | ICU_NO_ENCODE); + ok(res, "InternetCanonicalizeUrlA failed %u\n", GetLastError()); + ok(dwSize == lstrlenA(buffer), "got %d expected %d\n", dwSize, lstrlenA(buffer)); + todo_wine ok(!lstrcmpA("file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", buffer), + "got %s expected 'file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml'\n", buffer); + /* buffer is larger as the required size */ memset(buffer, '#', sizeof(buffer)-1); buffer[sizeof(buffer)-1] = '\0';
1
0
0
0
James Hawkins : gdi32: Fix a failing test in win95.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 6796c880fa7e010904f5f92ab3ff7426cddaa913 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6796c880fa7e010904f5f92ab…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sun Jun 29 22:06:17 2008 -0500 gdi32: Fix a failing test in win95. --- dlls/gdi32/tests/clipping.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/clipping.c b/dlls/gdi32/tests/clipping.c index 595a94e..0ae3eb6 100644 --- a/dlls/gdi32/tests/clipping.c +++ b/dlls/gdi32/tests/clipping.c @@ -111,7 +111,9 @@ static void test_GetRandomRgn(void) GetRgnBox(hrgn, &ret_rc); if(GetVersion() & 0x80000000) OffsetRect(&window_rc, -window_rc.left, -window_rc.top); - ok(EqualRect(&window_rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", + ok(EqualRect(&window_rc, &ret_rc) || + broken(IsRectEmpty(&ret_rc)), /* win95 */ + "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); DeleteObject(hrgn);
1
0
0
0
James Hawkins : comctl32: Fix two failing tests in win9x.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: b829b665ea1aadfb74dcefd0914eadd1d4c93373 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b829b665ea1aadfb74dcefd09…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sun Jun 29 21:08:36 2008 -0500 comctl32: Fix two failing tests in win9x. --- dlls/comdlg32/tests/filedlg.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/tests/filedlg.c b/dlls/comdlg32/tests/filedlg.c index bd7689f..ea999f3 100644 --- a/dlls/comdlg32/tests/filedlg.c +++ b/dlls/comdlg32/tests/filedlg.c @@ -111,7 +111,9 @@ static void test_DialogCancel(void) else { ok(0 == result, "expected %d, got %d\n", 0, result); - ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + ok(0 == CommDlgExtendedError() || + CDERR_INITIALIZATION == CommDlgExtendedError(), /* win9x */ + "expected %d or %d, got %d\n", 0, CDERR_INITIALIZATION, CommDlgExtendedError()); } @@ -122,7 +124,9 @@ static void test_DialogCancel(void) else { ok(0 == result, "expected %d, got %d\n", 0, result); - ok(0 == CommDlgExtendedError(), "expected %d, got %d\n", 0, + ok(0 == CommDlgExtendedError() || + CDERR_INITIALIZATION == CommDlgExtendedError(), /* win9x */ + "expected %d or %d, got %d\n", 0, CDERR_INITIALIZATION, CommDlgExtendedError()); } }
1
0
0
0
James Hawkins : comctl32: Clean up and fix a few failing tests in win9x.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 02c3bb76377113ebe05c3664c3dddca81de9e89b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02c3bb76377113ebe05c3664c…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sun Jun 29 21:02:10 2008 -0500 comctl32: Clean up and fix a few failing tests in win9x. --- dlls/comctl32/tests/misc.c | 82 +++++++++++++++++++++++++++++++++---------- 1 files changed, 63 insertions(+), 19 deletions(-) diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index 881f0b0..e3cf04b 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -42,8 +42,6 @@ static HMODULE hComctl32 = 0; FreeLibrary(hComctl32); \ } -#define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got) - static BOOL InitFunctionPtrs(void) { hComctl32 = LoadLibraryA("comctl32.dll"); @@ -96,21 +94,29 @@ static void test_GetPtrAW(void) count = 0; count = pStr_GetPtrA(source, NULL, 0); - ok (count == sourcelen, "Expected count to be %d, it was %d\n", sourcelen , count); + ok (count == sourcelen || + broken(count == sourcelen - 1), /* win9x */ + "Expected count to be %d, it was %d\n", sourcelen, count); count = 0; strcpy(dest, desttest); count = pStr_GetPtrA(source, dest, 0); - ok (count == sourcelen, "Expected count to be %d, it was %d\n", sourcelen , count); + ok (count == sourcelen || + broken(count == 0), /* win9x */ + "Expected count to be %d, it was %d\n", sourcelen, count); ok (!lstrcmp(dest, desttest), "Expected destination to not have changed\n"); count = 0; count = pStr_GetPtrA(source, NULL, destsize); - ok (count == sourcelen, "Expected count to be %d, it was %d\n", sourcelen , count); + ok (count == sourcelen || + broken(count == sourcelen - 1), /* win9x */ + "Expected count to be %d, it was %d\n", sourcelen, count); count = 0; count = pStr_GetPtrA(source, dest, destsize); - ok (count == sourcelen, "Expected count to be %d, it was %d\n", sourcelen , count); + ok (count == sourcelen || + broken(count == sourcelen - 1), /* win9x */ + "Expected count to be %d, it was %d\n", sourcelen, count); ok (!lstrcmp(source, dest), "Expected source and destination to be the same\n"); count = -1; @@ -122,7 +128,9 @@ static void test_GetPtrAW(void) count = 0; destsize = 15; count = pStr_GetPtrA(source, dest, destsize); - ok (count == 15, "Expected count to be 15, it was %d\n", count); + ok (count == 15 || + broken(count == 14), /* win9x */ + "Expected count to be 15, it was %d\n", count); ok (!memcmp(source, dest, 14), "Expected first part of source and destination to be the same\n"); ok (dest[14] == '\0', "Expected destination to be cut-off and 0 terminated\n"); } @@ -130,21 +138,57 @@ static void test_GetPtrAW(void) static void test_Alloc(void) { - PCHAR p = pAlloc(0); - ok(p != NULL, "p=%p\n", p); - ok(pFree(p), "\n"); + PCHAR p; + BOOL res; + DWORD size, min; + + /* allocate size 0 */ + p = pAlloc(0); + ok(p != NULL, "Expected non-NULL ptr\n"); + + /* get the minimum size */ + min = pGetSize(p); + + /* free the block */ + res = pFree(p); + ok(res == TRUE, "Expected TRUE, got %d\n", res); + + /* allocate size 1 */ p = pAlloc(1); - ok(p != NULL, "\n"); - *p = '\0'; - expect(1, pGetSize(p)); + ok(p != NULL, "Expected non-NULL ptr\n"); + + /* get the allocated size */ + size = pGetSize(p); + ok(size == 1 || + broken(size == min), /* win9x */ + "Expected 1, got %d\n", size); + + /* reallocate the block */ p = pReAlloc(p, 2); - ok(p != NULL, "\n"); - expect(2, pGetSize(p)); - ok(pFree(p), "\n"); - ok(pFree(NULL), "\n"); + ok(p != NULL, "Expected non-NULL ptr\n"); + + /* get the new size */ + size = pGetSize(p); + ok(size == 2 || + broken(size == min), /* win9x */ + "Expected 2, got %d\n", size); + + /* free the block */ + res = pFree(p); + ok(res == TRUE, "Expected TRUE, got %d\n", res); + + /* free a NULL ptr */ + res = pFree(NULL); + ok(res == TRUE || + broken(res == FALSE), /* win9x */ + "Expected TRUE, got %d\n", res); + + /* reallocate a NULL ptr */ p = pReAlloc(NULL, 2); - ok(p != NULL, "\n"); - ok(pFree(p), "\n"); + ok(p != NULL, "Expectd non-NULL ptr\n"); + + res = pFree(p); + ok(res == TRUE, "Expected TRUE, got %d\n", res); } START_TEST(misc)
1
0
0
0
James Hawkins : advpack: Fix several test failures in win9x.
by Alexandre Julliard
30 Jun '08
30 Jun '08
Module: wine Branch: master Commit: 10a1b94875bdb5c62185cd0652076d027ba036df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10a1b94875bdb5c62185cd065…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sun Jun 29 18:20:11 2008 -0500 advpack: Fix several test failures in win9x. --- dlls/advpack/tests/install.c | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c index 9423dd0..854ede6 100644 --- a/dlls/advpack/tests/install.c +++ b/dlls/advpack/tests/install.c @@ -73,9 +73,7 @@ static void create_inf_file(LPCSTR filename) append_str(&ptr, "Signature=\"$Chicago$\"\n"); append_str(&ptr, "AdvancedINF=2.5\n"); append_str(&ptr, "[DefaultInstall]\n"); - append_str(&ptr, "RegisterOCXs=RegisterOCXsSection\n"); - append_str(&ptr, "[RegisterOCXsSection]\n"); - append_str(&ptr, "%%11%%\\ole32.dll\n"); + append_str(&ptr, "CheckAdminRights=1\n"); WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL); CloseHandle(hf); @@ -118,7 +116,9 @@ static void test_RunSetupCommand(void) /* try to run an exe with the RSC_FLAG_INF flag */ hexe = (HANDLE)0xdeadbeef; hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(is_spapi_err(hr), "Expected a setupapi error, got %d\n", hr); + ok(is_spapi_err(hr) || + hr == E_FAIL, /* win9x */ + "Expected a setupapi error or E_FAIL, got %d\n", hr); ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n"); ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); @@ -151,7 +151,9 @@ static void test_RunSetupCommand(void) /* try a relative path to the INF, with working dir provided */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS || + hr == E_FAIL, /* win9x */ + "Expected ERROR_SUCCESS, got %d\n", hr); /* try a relative path to the INF, NULL working dir */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -160,12 +162,15 @@ static void test_RunSetupCommand(void) /* try a relative path to the INF, empty working dir */ hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); + ok(hr == ERROR_SUCCESS || + hr == E_FAIL, /* win9x */ + "Expected ERROR_SUCCESS or E_FAIL, got %d\n", hr); /* try only the INF filename, with working dir provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + hr == E_FAIL, /* win9x */ + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); /* try only the INF filename, NULL working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -174,8 +179,9 @@ static void test_RunSetupCommand(void) /* try only the INF filename, empty working dir */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + hr == E_FAIL, /* win9x */ + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); DeleteFileA("one\\test.inf"); RemoveDirectoryA("one"); @@ -184,8 +190,9 @@ static void test_RunSetupCommand(void) /* try INF file in the current directory, working directory provided */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + hr == E_FAIL, /* win9x */ + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); /* try INF file in the current directory, NULL working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); @@ -194,8 +201,9 @@ static void test_RunSetupCommand(void) /* try INF file in the current directory, empty working directory */ hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + hr == E_FAIL, /* win9x */ + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); } static void test_LaunchINFSection(void)
1
0
0
0
← Newer
1
2
3
4
5
...
95
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
Results per page:
10
25
50
100
200