winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 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
4 participants
1001 discussions
Start a n
N
ew thread
Francois Gouget : shlwapi/tests: Skip the string tests for the functions that are not available on Win9x.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: bd4dcad02f58e7eb1337a512429da76a3c9329e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd4dcad02f58e7eb1337a5124…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 5 12:03:45 2008 +0100 shlwapi/tests: Skip the string tests for the functions that are not available on Win9x. --- dlls/shlwapi/tests/string.c | 131 ++++++++++++++++++++++++++++++++---------- 1 files changed, 100 insertions(+), 31 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 61fcf41..0b4f28b 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -39,11 +39,20 @@ static BOOL (WINAPI *pIntlStrEqWorkerA)(BOOL,LPCSTR,LPCSTR,int); static BOOL (WINAPI *pIntlStrEqWorkerW)(BOOL,LPCWSTR,LPCWSTR,int); static DWORD (WINAPI *pSHAnsiToAnsi)(LPCSTR,LPSTR,int); static DWORD (WINAPI *pSHUnicodeToUnicode)(LPCWSTR,LPWSTR,int); +static LPSTR (WINAPI *pStrCatBuffA)(LPSTR,LPCSTR,INT); +static LPWSTR (WINAPI *pStrCatBuffW)(LPWSTR,LPCWSTR,INT); static LPSTR (WINAPI *pStrCpyNXA)(LPSTR,LPCSTR,int); static LPWSTR (WINAPI *pStrCpyNXW)(LPWSTR,LPCWSTR,int); +static LPSTR (WINAPI *pStrFormatByteSize64A)(LONGLONG,LPSTR,UINT); +static LPSTR (WINAPI *pStrFormatKBSizeA)(LONGLONG,LPSTR,UINT); +static LPWSTR (WINAPI *pStrFormatKBSizeW)(LONGLONG,LPWSTR,UINT); static BOOL (WINAPI *pStrIsIntlEqualA)(BOOL,LPCSTR,LPCSTR,int); static BOOL (WINAPI *pStrIsIntlEqualW)(BOOL,LPCWSTR,LPCWSTR,int); static HRESULT (WINAPI *pStrRetToBSTR)(STRRET*,void*,BSTR*); +static HRESULT (WINAPI *pStrRetToBufA)(STRRET*,LPCITEMIDLIST,LPSTR,UINT); +static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT); +static INT (WINAPIV *pwnsprintfA)(LPSTR,INT,LPCSTR, ...); +static INT (WINAPIV *pwnsprintfW)(LPWSTR,INT,LPCWSTR, ...); static int strcmpW(const WCHAR *str1, const WCHAR *str2) { @@ -490,9 +499,15 @@ static void test_StrFormatByteSize64A(void) char szBuff[256]; const StrFormatSizeResult* result = StrFormatSize_results; + if (!pStrFormatByteSize64A) + { + skip("StrFormatByteSize64A() is not available. Tests skipped\n"); + return; + } + while(result->value) { - StrFormatByteSize64A(result->value, szBuff, 256); + pStrFormatByteSize64A(result->value, szBuff, 256); ok(!strcmp(result->byte_size_64, szBuff), "Formatted %x%08x wrong: got %s, expected %s\n", @@ -508,9 +523,15 @@ static void test_StrFormatKBSizeW(void) char szBuff[256]; const StrFormatSizeResult* result = StrFormatSize_results; + if (!pStrFormatKBSizeW) + { + skip("StrFormatKBSizeW() is not available. Tests skipped\n"); + return; + } + while(result->value) { - StrFormatKBSizeW(result->value, szBuffW, 256); + pStrFormatKBSizeW(result->value, szBuffW, 256); WideCharToMultiByte(0,0,szBuffW,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR),0,0); ok(!strcmp(result->kb_size, szBuff), "Formatted %x%08x wrong: got %s, expected %s\n", @@ -524,9 +545,15 @@ static void test_StrFormatKBSizeA(void) char szBuff[256]; const StrFormatSizeResult* result = StrFormatSize_results; + if (!pStrFormatKBSizeA) + { + skip("StrFormatKBSizeA() is not available. Tests skipped\n"); + return; + } + while(result->value) { - StrFormatKBSizeA(result->value, szBuff, 256); + pStrFormatKBSizeA(result->value, szBuff, 256); ok(!strcmp(result->kb_size, szBuff), "Formatted %x%08x wrong: got %s, expected %s\n", @@ -794,42 +821,75 @@ static void test_StrXXX_overflows(void) expect_eq(StrCpyNA(buf, str1, 10), buf, PCHAR, "%p"); expect_eq(buf[9], 0, CHAR, "%x"); expect_eq(buf[10], '\xbf', CHAR, "%x"); - expect_eq(StrCatBuffA(buf, str1, 100), buf, PCHAR, "%p"); - expect_eq(buf[99], 0, CHAR, "%x"); - expect_eq(buf[100], '\xbf', CHAR, "%x"); + + if (pStrCatBuffA) + { + expect_eq(pStrCatBuffA(buf, str1, 100), buf, PCHAR, "%p"); + expect_eq(buf[99], 0, CHAR, "%x"); + expect_eq(buf[100], '\xbf', CHAR, "%x"); + } + else + skip("StrCatBuffA() is not available. Tests skipped\n"); memset(wbuf, 0xbf, sizeof(wbuf)); expect_eq(StrCpyNW(wbuf, wstr1, 10), wbuf, PWCHAR, "%p"); expect_eq(wbuf[9], 0, WCHAR, "%x"); expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); - expect_eq(StrCatBuffW(wbuf, wstr1, 100), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[99], 0, WCHAR, "%x"); - expect_eq(wbuf[100], (WCHAR)0xbfbf, WCHAR, "%x"); - memset(wbuf, 0xbf, sizeof(wbuf)); - strret.uType = STRRET_WSTR; - U(strret).pOleStr = StrDupW(wstr1); - expect_eq(StrRetToBufW(&strret, NULL, wbuf, 10), S_OK, HRESULT, "%x"); - expect_eq(wbuf[9], 0, WCHAR, "%x"); - expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); + if (pStrCatBuffW) + { + expect_eq(pStrCatBuffW(wbuf, wstr1, 100), wbuf, PWCHAR, "%p"); + expect_eq(wbuf[99], 0, WCHAR, "%x"); + expect_eq(wbuf[100], (WCHAR)0xbfbf, WCHAR, "%x"); + } + else + skip("StrCatBuffW() is not available. Tests skipped\n"); - memset(buf, 0xbf, sizeof(buf)); - strret.uType = STRRET_CSTR; - StrCpyN(U(strret).cStr, str1, MAX_PATH); - expect_eq(StrRetToBufA(&strret, NULL, buf, 10), S_OK, HRESULT, "%x"); - expect_eq(buf[9], 0, CHAR, "%x"); - expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); + if (pStrRetToBufW) + { + memset(wbuf, 0xbf, sizeof(wbuf)); + strret.uType = STRRET_WSTR; + U(strret).pOleStr = StrDupW(wstr1); + expect_eq(pStrRetToBufW(&strret, NULL, wbuf, 10), S_OK, HRESULT, "%x"); + expect_eq(wbuf[9], 0, WCHAR, "%x"); + expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); + } + else + skip("StrRetToBufW() is not available. Tests skipped\n"); - memset(buf, 0xbf, sizeof(buf)); - ret = wnsprintfA(buf, 10, "%s", str1); - todo_wine ok(ret == 9, "Unexpected wsnprintfA return %d, expected 9\n", ret); - expect_eq(buf[9], 0, CHAR, "%x"); - expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); - memset(wbuf, 0xbf, sizeof(wbuf)); - ret = wnsprintfW(wbuf, 10, fmt, wstr1); - todo_wine ok(ret == 9, "Unexpected wsnprintfW return %d, expected 9\n", ret); - expect_eq(wbuf[9], 0, WCHAR, "%x"); - expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); + if (pStrRetToBufA) + { + memset(buf, 0xbf, sizeof(buf)); + strret.uType = STRRET_CSTR; + StrCpyN(U(strret).cStr, str1, MAX_PATH); + expect_eq(pStrRetToBufA(&strret, NULL, buf, 10), S_OK, HRESULT, "%x"); + expect_eq(buf[9], 0, CHAR, "%x"); + expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); + } + else + skip("StrRetToBufA() is not available. Tests skipped\n"); + + if (pwnsprintfA) + { + memset(buf, 0xbf, sizeof(buf)); + ret = pwnsprintfA(buf, 10, "%s", str1); + todo_wine ok(ret == 9, "Unexpected wsnprintfA return %d, expected 9\n", ret); + expect_eq(buf[9], 0, CHAR, "%x"); + expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); + } + else + skip("wnsprintfA() is not available. Tests skipped\n"); + + if (pwnsprintfW) + { + memset(wbuf, 0xbf, sizeof(wbuf)); + ret = pwnsprintfW(wbuf, 10, fmt, wstr1); + todo_wine ok(ret == 9, "Unexpected wsnprintfW return %d, expected 9\n", ret); + expect_eq(wbuf[9], 0, WCHAR, "%x"); + expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); + } + else + skip("wnsprintfW() is not available. Tests skipped\n"); } START_TEST(string) @@ -847,11 +907,20 @@ START_TEST(string) pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); + pStrCatBuffA = (void *)GetProcAddress(hShlwapi, "StrCatBuffA"); + pStrCatBuffW = (void *)GetProcAddress(hShlwapi, "StrCatBuffW"); pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); + pStrFormatByteSize64A = (void *)GetProcAddress(hShlwapi, "StrFormatByteSize64A"); + pStrFormatKBSizeA = (void *)GetProcAddress(hShlwapi, "StrFormatKBSizeA"); + pStrFormatKBSizeW = (void *)GetProcAddress(hShlwapi, "StrFormatKBSizeW"); pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); + pStrRetToBufA = (void *)GetProcAddress(hShlwapi, "StrRetToBufA"); + pStrRetToBufW = (void *)GetProcAddress(hShlwapi, "StrRetToBufW"); + pwnsprintfA = (void *)GetProcAddress(hShlwapi, "wnsprintfA"); + pwnsprintfW = (void *)GetProcAddress(hShlwapi, "wnsprintfW"); test_StrChrA(); test_StrChrW();
1
0
0
0
Francois Gouget : shlwapi/tests: The function pointers are global so initialize them on startup, before they are used.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: d573ca8332e8f86553f80466eaf48bfcb5f6a6fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d573ca8332e8f86553f80466e…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 5 12:03:29 2008 +0100 shlwapi/tests: The function pointers are global so initialize them on startup, before they are used. --- dlls/shlwapi/tests/string.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 9186da0..61fcf41 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -35,16 +35,15 @@ ok(ret == val, "Unexpected value of '" #expr "': " #fmt " instead of " #val "\n", ret); \ } while (0); -static HMODULE hShlwapi; -static LPSTR (WINAPI *pStrCpyNXA)(LPSTR,LPCSTR,int); -static LPWSTR (WINAPI *pStrCpyNXW)(LPWSTR,LPCWSTR,int); -static HRESULT (WINAPI *pStrRetToBSTR)(STRRET*,void*,BSTR*); +static BOOL (WINAPI *pIntlStrEqWorkerA)(BOOL,LPCSTR,LPCSTR,int); +static BOOL (WINAPI *pIntlStrEqWorkerW)(BOOL,LPCWSTR,LPCWSTR,int); static DWORD (WINAPI *pSHAnsiToAnsi)(LPCSTR,LPSTR,int); static DWORD (WINAPI *pSHUnicodeToUnicode)(LPCWSTR,LPWSTR,int); +static LPSTR (WINAPI *pStrCpyNXA)(LPSTR,LPCSTR,int); +static LPWSTR (WINAPI *pStrCpyNXW)(LPWSTR,LPCWSTR,int); static BOOL (WINAPI *pStrIsIntlEqualA)(BOOL,LPCSTR,LPCSTR,int); -static BOOL (WINAPI *pIntlStrEqWorkerA)(BOOL,LPCSTR,LPCSTR,int); static BOOL (WINAPI *pStrIsIntlEqualW)(BOOL,LPCWSTR,LPCWSTR,int); -static BOOL (WINAPI *pIntlStrEqWorkerW)(BOOL,LPCWSTR,LPCWSTR,int); +static HRESULT (WINAPI *pStrRetToBSTR)(STRRET*,void*,BSTR*); static int strcmpW(const WCHAR *str1, const WCHAR *str2) { @@ -561,7 +560,6 @@ static void test_StrCmpA(void) ok(!ChrCmpIA('b', 'B'), "ChrCmpIA is not case-insensitive\n"); ok(ChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n"); - pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); if (pStrIsIntlEqualA) { ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n"); @@ -570,7 +568,6 @@ static void test_StrCmpA(void) else skip("StrIsIntlEqualA() is not available. Tests skipped\n"); - pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); if (pIntlStrEqWorkerA) { ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n"); @@ -590,7 +587,6 @@ static void test_StrCmpW(void) ok(!ChrCmpIW('b', 'B'), "ChrCmpIW is not case-insensitive\n"); ok(ChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n"); - pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); if (pStrIsIntlEqualW) { ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n"); @@ -599,7 +595,6 @@ static void test_StrCmpW(void) else skip("StrIsIntlEqualW() is not available. Tests skipped\n"); - pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); if (pIntlStrEqWorkerW) { ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n"); @@ -625,7 +620,6 @@ static void test_StrRetToBSTR(void) STRRET strret; HRESULT ret; - pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); if (!pStrRetToBSTR) { skip("StrRetToBSTR() is not available. Tests skipped\n"); @@ -667,7 +661,6 @@ static void test_StrCpyNXA(void) LPSTR lpszRes; char dest[8]; - pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); if (!pStrCpyNXA) { skip("StrCpyNXA() is not available. Tests skipped\n"); @@ -689,7 +682,6 @@ static void test_StrCpyNXW(void) LPWSTR lpszRes; WCHAR dest[8]; - pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); if (!pStrCpyNXW) { skip("StrCpyNXW() is not available. Tests skipped\n"); @@ -699,7 +691,7 @@ static void test_StrCpyNXW(void) memcpy(dest, lpInit, sizeof(lpInit)); lpszRes = pStrCpyNXW(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); ok(lpszRes == dest + 5 && !memcmp(dest, lpRes, sizeof(dest)), - "StrCpyNXA: expected %p, \"hello\\0\\n\\n\", got %p, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", + "StrCpyNXW: expected %p, \"hello\\0\\n\\n\", got %p, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", dest + 5, lpszRes, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); } @@ -747,7 +739,6 @@ static void test_SHAnsiToAnsi(void) char dest[8]; DWORD dwRet; - pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); if (!pSHAnsiToAnsi) { skip("SHAnsiToAnsi() is not available. Tests skipped\n"); @@ -769,7 +760,6 @@ static void test_SHUnicodeToUnicode(void) WCHAR dest[8]; DWORD dwRet; - pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); if (!pSHUnicodeToUnicode) { skip("SHUnicodeToUnicode() is not available. Tests skipped\n"); @@ -844,6 +834,7 @@ static void test_StrXXX_overflows(void) START_TEST(string) { + HMODULE hShlwapi; TCHAR thousandDelim[8]; TCHAR decimalDelim[8]; CoInitialize(0); @@ -852,6 +843,15 @@ START_TEST(string) GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8); hShlwapi = GetModuleHandleA("shlwapi"); + pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); + pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); + pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); + pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); + pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); + pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); + pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); + pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); + pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); test_StrChrA(); test_StrChrW();
1
0
0
0
Francois Gouget : shlwapi/tests: Add skip statements for missing functions to the string tests.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 34b5e424e04e183a63f2f356b9da9f0615b326f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=34b5e424e04e183a63f2f356b…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Mar 5 12:02:13 2008 +0100 shlwapi/tests: Add skip statements for missing functions to the string tests. --- dlls/shlwapi/tests/string.c | 72 ++++++++++++++++++++++++++++--------------- 1 files changed, 47 insertions(+), 25 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index b90dcc6..9186da0 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -562,19 +562,22 @@ static void test_StrCmpA(void) ok(ChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n"); pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); - pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); - - if (!pStrIsIntlEqualA) - return; - - ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n"); - ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n"); - - if (!pIntlStrEqWorkerA) - return; + if (pStrIsIntlEqualA) + { + ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n"); + ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n"); + } + else + skip("StrIsIntlEqualA() is not available. Tests skipped\n"); - ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n"); - ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n"); + pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); + if (pIntlStrEqWorkerA) + { + ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n"); + ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n"); + } + else + skip("IntlStrEqWorkerA() is not available. Tests skipped\n"); } static void test_StrCmpW(void) @@ -588,19 +591,22 @@ static void test_StrCmpW(void) ok(ChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n"); pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); - pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); - - if (!pStrIsIntlEqualW) - return; - - ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n"); - ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n"); - - if (!pIntlStrEqWorkerW) - return; + if (pStrIsIntlEqualW) + { + ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n"); + ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n"); + } + else + skip("StrIsIntlEqualW() is not available. Tests skipped\n"); - ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n"); - ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n"); + pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); + if (pIntlStrEqWorkerW) + { + ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n"); + ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n"); + } + else + skip("IntlStrEqWorkerW() is not available. Tests skipped\n"); } static WCHAR *CoDupStrW(const char* src) @@ -620,7 +626,11 @@ static void test_StrRetToBSTR(void) HRESULT ret; pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); - if (!pStrRetToBSTR) return; + if (!pStrRetToBSTR) + { + skip("StrRetToBSTR() is not available. Tests skipped\n"); + return; + } strret.uType = STRRET_WSTR; U(strret).pOleStr = CoDupStrW("Test"); @@ -659,7 +669,10 @@ static void test_StrCpyNXA(void) pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); if (!pStrCpyNXA) + { + skip("StrCpyNXA() is not available. Tests skipped\n"); return; + } memset(dest, '\n', sizeof(dest)); lpszRes = pStrCpyNXA(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); @@ -678,7 +691,10 @@ static void test_StrCpyNXW(void) pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); if (!pStrCpyNXW) + { + skip("StrCpyNXW() is not available. Tests skipped\n"); return; + } memcpy(dest, lpInit, sizeof(lpInit)); lpszRes = pStrCpyNXW(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); @@ -733,7 +749,10 @@ static void test_SHAnsiToAnsi(void) pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); if (!pSHAnsiToAnsi) + { + skip("SHAnsiToAnsi() is not available. Tests skipped\n"); return; + } memset(dest, '\n', sizeof(dest)); dwRet = pSHAnsiToAnsi("hello", dest, sizeof(dest)/sizeof(dest[0])); @@ -752,7 +771,10 @@ static void test_SHUnicodeToUnicode(void) pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); if (!pSHUnicodeToUnicode) + { + skip("SHUnicodeToUnicode() is not available. Tests skipped\n"); return; + } memcpy(dest, lpInit, sizeof(lpInit)); dwRet = pSHUnicodeToUnicode(lpSrc, dest, sizeof(dest)/sizeof(dest[0]));
1
0
0
0
Maarten Lankhorst : oleaut32: Handle TKIND_ALIAS properly when passed as pointer.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: c978bbee87dd6e09e4ad836df5ad7d63506face2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c978bbee87dd6e09e4ad836df…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Mon Mar 3 14:27:03 2008 -0800 oleaut32: Handle TKIND_ALIAS properly when passed as pointer. --- dlls/oleaut32/tmarshal.c | 34 ++++++++++++++++++++++++++++++---- 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 2e5ae14..8a6e267 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -698,11 +698,24 @@ serialize_param( } ITypeInfo_GetTypeAttr(tinfo2,&tattr); switch (tattr->typekind) { + case TKIND_ALIAS: + if (tattr->tdescAlias.vt == VT_USERDEFINED) + { + DWORD href = tattr->tdescAlias.u.hreftype; + ITypeInfo_ReleaseTypeAttr(tinfo, tattr); + ITypeInfo_Release(tinfo2); + hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2); + if (hres) { + ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype); + return hres; + } + ITypeInfo_GetTypeAttr(tinfo2,&tattr); + derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE); + } + break; case TKIND_ENUM: /* confirmed */ case TKIND_RECORD: /* FIXME: mostly untested */ - derefhere=TRUE; break; - case TKIND_ALIAS: /* FIXME: untested */ case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */ case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */ derefhere=FALSE; @@ -1030,11 +1043,24 @@ deserialize_param( } ITypeInfo_GetTypeAttr(tinfo2,&tattr); switch (tattr->typekind) { + case TKIND_ALIAS: + if (tattr->tdescAlias.vt == VT_USERDEFINED) + { + DWORD href = tattr->tdescAlias.u.hreftype; + ITypeInfo_ReleaseTypeAttr(tinfo, tattr); + ITypeInfo_Release(tinfo2); + hres = ITypeInfo_GetRefTypeInfo(tinfo,href,&tinfo2); + if (hres) { + ERR("Could not get typeinfo of hreftype %x for VT_USERDEFINED.\n",tdesc->u.lptdesc->u.hreftype); + return hres; + } + ITypeInfo_GetTypeAttr(tinfo2,&tattr); + derefhere = (tattr->typekind != TKIND_DISPATCH && tattr->typekind != TKIND_INTERFACE); + } + break; case TKIND_ENUM: /* confirmed */ case TKIND_RECORD: /* FIXME: mostly untested */ - derefhere=TRUE; break; - case TKIND_ALIAS: /* FIXME: untested */ case TKIND_DISPATCH: /* will be done in VT_USERDEFINED case */ case TKIND_INTERFACE: /* will be done in VT_USERDEFINED case */ derefhere=FALSE;
1
0
0
0
Alexandre Julliard : winex11: Retrieve the current window placement in MapNotify before modifying it.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 6f14ba738706383c01a749ca3c8d72d1351ed583 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f14ba738706383c01a749ca3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 5 11:25:27 2008 +0100 winex11: Retrieve the current window placement in MapNotify before modifying it. --- dlls/winex11.drv/winpos.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index eb96a82..b2f7a3f 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -480,6 +480,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event ) X11DRV_X_to_window_rect( data, &rect ); wp.length = sizeof(wp); + GetWindowPlacement( hwnd, &wp ); wp.flags = 0; wp.showCmd = SW_RESTORE; wp.rcNormalPosition = rect;
1
0
0
0
Alexandre Julliard : winex11: Ignore Map/ UnmapNotify if the window is already in the appropriate state.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: db43e7a582a8567aafa5c9131c2a6d1050972647 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db43e7a582a8567aafa5c9131…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 5 11:24:40 2008 +0100 winex11: Ignore Map/UnmapNotify if the window is already in the appropriate state. --- dlls/winex11.drv/winpos.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 1f5d843..eb96a82 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -455,6 +455,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent *event ) if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ return; } + if (!data->iconic) return; state = get_window_wm_state( event->xmap.display, data ); if (state == NormalState) @@ -502,7 +503,7 @@ void X11DRV_UnmapNotify( HWND hwnd, XEvent *event ) int state; if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->managed || !data->mapped) return; + if (!data->managed || !data->mapped || data->iconic) return; state = get_window_wm_state( event->xunmap.display, data ); if (state == IconicState)
1
0
0
0
Paul Vriens : msi/tests: Make tests run on win9x/NT4 again.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 2c22e9aeb697ed3ba8e45cc5ab00638a95d6cd8f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c22e9aeb697ed3ba8e45cc5a…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Wed Mar 5 08:20:42 2008 +0100 msi/tests: Make tests run on win9x/NT4 again. --- dlls/msi/tests/msi.c | 1111 +++++++++++++++++++++++++------------------------- 1 files changed, 560 insertions(+), 551 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2c22e9aeb697ed3ba8e45…
1
0
0
0
Stefan Dösinger : wined3d: Fix a small bug in a patch from yesterday.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 6ea0880e4358916ab6d4b00beade1cf95906c2a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ea0880e4358916ab6d4b00be…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Mar 5 02:40:16 2008 +0100 wined3d: Fix a small bug in a patch from yesterday. --- dlls/wined3d/context.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 4362b6c..52b1099 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -915,11 +915,11 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU } if(This->activeContext->vshader_const_dirty) { memset(This->activeContext->vshader_const_dirty, 1, - sizeof(This->activeContext->vshader_const_dirty) * GL_LIMITS(vshader_constantsF)); + sizeof(*This->activeContext->vshader_const_dirty) * GL_LIMITS(vshader_constantsF)); } if(This->activeContext->pshader_const_dirty) { memset(This->activeContext->pshader_const_dirty, 1, - sizeof(This->activeContext->pshader_const_dirty) * GL_LIMITS(pshader_constantsF)); + sizeof(*This->activeContext->pshader_const_dirty) * GL_LIMITS(pshader_constantsF)); } This->activeContext = context; }
1
0
0
0
Dan Hipschman : qmgr: Implement IBackgroundCopyJob_Resume.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: eb7043699341d0bbf861529d6e07a557e990a298 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb7043699341d0bbf861529d6…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Tue Mar 4 16:01:43 2008 -0800 qmgr: Implement IBackgroundCopyJob_Resume. --- dlls/qmgr/job.c | 32 ++++++++++++++++++++++++++++---- dlls/qmgr/qmgr.h | 1 + dlls/qmgr/tests/job.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 4 deletions(-) diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 8e3bce4..2a894ba 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -119,8 +119,25 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_Suspend( static HRESULT WINAPI BITS_IBackgroundCopyJob_Resume( IBackgroundCopyJob* iface) { - FIXME("Not implemented\n"); - return E_NOTIMPL; + BackgroundCopyJobImpl *This = (BackgroundCopyJobImpl *) iface; + + if (This->state == BG_JOB_STATE_CANCELLED + || This->state == BG_JOB_STATE_ACKNOWLEDGED) + { + return BG_E_INVALID_STATE; + } + + if (This->jobProgress.FilesTransferred == This->jobProgress.FilesTotal) + return BG_E_EMPTY; + + if (This->state == BG_JOB_STATE_CONNECTING + || This->state == BG_JOB_STATE_TRANSFERRING) + { + return S_OK; + } + + This->state = BG_JOB_STATE_QUEUED; + return S_OK; } static HRESULT WINAPI BITS_IBackgroundCopyJob_Cancel( @@ -188,8 +205,13 @@ static HRESULT WINAPI BITS_IBackgroundCopyJob_GetState( IBackgroundCopyJob* iface, BG_JOB_STATE *pVal) { - FIXME("Not implemented\n"); - return E_NOTIMPL; + BackgroundCopyJobImpl *This = (BackgroundCopyJobImpl *) iface; + + if (!pVal) + return E_INVALIDARG; + + *pVal = This->state; + return S_OK; } static HRESULT WINAPI BITS_IBackgroundCopyJob_GetError( @@ -446,6 +468,8 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, This->jobProgress.FilesTotal = 0; This->jobProgress.FilesTransferred = 0; + This->state = BG_JOB_STATE_SUSPENDED; + *ppObj = &This->lpVtbl; return S_OK; } diff --git a/dlls/qmgr/qmgr.h b/dlls/qmgr/qmgr.h index 2ab3f57..f40b1a5 100644 --- a/dlls/qmgr/qmgr.h +++ b/dlls/qmgr/qmgr.h @@ -40,6 +40,7 @@ typedef struct GUID jobId; struct list files; BG_JOB_PROGRESS jobProgress; + BG_JOB_STATE state; struct list entryFromQmgr; } BackgroundCopyJobImpl; diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c index 26cbfe9..fab1c8d 100644 --- a/dlls/qmgr/tests/job.c +++ b/dlls/qmgr/tests/job.c @@ -239,6 +239,47 @@ static void test_GetProgress_preTransfer(void) ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %u\n", progress.FilesTransferred); } +/* Test getting job state */ +static void test_GetState(void) +{ + HRESULT hres; + BG_JOB_STATE state; + + state = BG_JOB_STATE_ERROR; + hres = IBackgroundCopyJob_GetState(test_job, &state); + ok(hres == S_OK, "GetState failed: 0x%08x\n", hres); + if (hres != S_OK) + { + skip("Unable to get job state\n"); + return; + } + ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); +} + +/* Test resuming a job */ +static void test_ResumeEmpty(void) +{ + HRESULT hres; + BG_JOB_STATE state; + + hres = IBackgroundCopyJob_Resume(test_job); + ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres); + if (hres != BG_E_EMPTY) + { + skip("Failed calling resume job\n"); + return; + } + + state = BG_JOB_STATE_ERROR; + hres = IBackgroundCopyJob_GetState(test_job, &state); + if (hres != S_OK) + { + skip("Unable to get job state\n"); + return; + } + ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); +} + typedef void (*test_t)(void); START_TEST(job) @@ -250,6 +291,8 @@ START_TEST(job) test_AddFile, test_EnumFiles, test_GetProgress_preTransfer, + test_GetState, + test_ResumeEmpty, 0 }; const test_t *test;
1
0
0
0
Lei Zhang : shell32: Remove unused variable.
by Alexandre Julliard
05 Mar '08
05 Mar '08
Module: wine Branch: master Commit: 5637c779d24fbecd609cf5288f5d650cb25f3d8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5637c779d24fbecd609cf5288…
Author: Lei Zhang <thestig(a)google.com> Date: Fri Feb 29 17:20:41 2008 -0800 shell32: Remove unused variable. --- dlls/shell32/shellpath.c | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 796e539..d3d3b75 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -1164,7 +1164,7 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, HRESULT hr; WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH]; LPCWSTR pShellFolderPath, pUserShellFolderPath; - DWORD dwDisp, dwType, dwPathLen = MAX_PATH; + DWORD dwType, dwPathLen = MAX_PATH; HKEY userShellFolderKey, shellFolderKey; TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value), @@ -1187,14 +1187,12 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, pShellFolderPath = szSHFolders; } - if (RegCreateKeyExW(rootKey, pShellFolderPath, 0, NULL, 0, KEY_ALL_ACCESS, - NULL, &shellFolderKey, &dwDisp)) + if (RegCreateKeyW(rootKey, pShellFolderPath, &shellFolderKey)) { TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath)); return E_FAIL; } - if (RegCreateKeyExW(rootKey, pUserShellFolderPath, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &userShellFolderKey, &dwDisp)) + if (RegCreateKeyW(rootKey, pUserShellFolderPath, &userShellFolderKey)) { TRACE("Failed to create %s\n", debugstr_w(pUserShellFolderPath)); @@ -1329,10 +1327,8 @@ static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, else { HKEY hKey; - DWORD dwDisp; - if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szCurrentVersion, 0, - NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp)) + if (RegCreateKeyW(HKEY_LOCAL_MACHINE, szCurrentVersion, &hKey)) hr = E_FAIL; else { @@ -1783,20 +1779,18 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, WCHAR path[MAX_PATH]; HRESULT hr = S_OK; HKEY hUserKey = NULL, hKey = NULL; - DWORD dwDisp, dwType, dwPathLen; + DWORD dwType, dwPathLen; LONG ret; TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken, debugstr_w(szUserShellFolderPath), folders, foldersLen); - ret = RegCreateKeyExW(hRootKey, szUserShellFolderPath, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &hUserKey, &dwDisp); + ret = RegCreateKeyW(hRootKey, szUserShellFolderPath, &hUserKey); if (ret) hr = HRESULT_FROM_WIN32(ret); else { - ret = RegCreateKeyExW(hRootKey, szShellFolderPath, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); + ret = RegCreateKeyW(hRootKey, szShellFolderPath, &hKey); if (ret) hr = HRESULT_FROM_WIN32(ret); }
1
0
0
0
← Newer
1
...
85
86
87
88
89
90
91
...
101
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
97
98
99
100
101
Results per page:
10
25
50
100
200