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
May 2009
----- 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
793 discussions
Start a n
N
ew thread
Andrew Nguyen : kernel32/tests: Correctly skip when Unicode thread functions are not available.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: b0abafe70fd7a5f031ac4780dc315b13ff65df49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0abafe70fd7a5f031ac4780d…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:45 2009 -0500 kernel32/tests: Correctly skip when Unicode thread functions are not available. --- dlls/kernel32/tests/thread.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index c1d65c1..2c699b4 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -693,7 +693,10 @@ static VOID test_thread_priority(void) SetLastError(0xdeadbeef); rc=pGetThreadPriorityBoost(curthread,&disabled); if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - return; /* WinME */ + { + win_skip("GetThreadPriorityBoost is not implemented on WinME\n"); + return; + } todo_wine ok(rc!=0,"error=%d\n",GetLastError()); @@ -755,7 +758,10 @@ static VOID test_GetThreadTimes(void) /* GetThreadTimes should set all of the parameters passed to it */ error=GetThreadTimes(thread,&creationTime,&exitTime, &kernelTime,&userTime); - if (error!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED) { + + if (error == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + win_skip("GetThreadTimes is not implemented\n"); + else { ok(error!=0,"GetThreadTimes failed\n"); ok(creationTime.dwLowDateTime!=99 || creationTime.dwHighDateTime!=99, "creationTime was invalid\n");
1
0
0
0
Andrew Nguyen : kernel32/tests: Correctly skip when GetTempPathW is not available.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: fda79ef2178256e9f90afed8b10476f9c119bc43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fda79ef2178256e9f90afed8b…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:42 2009 -0500 kernel32/tests: Correctly skip when GetTempPathW is not available. --- dlls/kernel32/tests/path.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index 20ee453..de26fc9 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -878,8 +878,11 @@ static void test_GetTempPathW(char* tmp_dir) lstrcpyW(buf, fooW); len = GetTempPathW(MAX_PATH, buf); - if (len==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (len == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetTempPathW is not available\n"); return; + } ok(lstrcmpiW(buf, tmp_dirW) == 0, "GetTempPathW returned an incorrect temporary path\n"); ok(len == lstrlenW(buf), "returned length should be equal to the length of string\n");
1
0
0
0
Andrew Nguyen : kernel32/tests: Correctly skip when Unicode locale functions are not available.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 1e74b21f182162e03ba1e9490d3f5b5cebe309ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e74b21f182162e03ba1e9490…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:37 2009 -0500 kernel32/tests: Correctly skip when Unicode locale functions are not available. --- dlls/kernel32/tests/locale.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index e88e182..4f287cf 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -432,7 +432,10 @@ static void test_GetDateFormatW(void) ret = GetDateFormatW(LOCALE_SYSTEM_DEFAULT, DATE_LONGDATE, NULL, input, buffer, COUNTOF(buffer)); if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - return; + { + win_skip("GetDateFormatW is not implemented\n"); + return; + } ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); EXPECT_EQW; @@ -1631,8 +1634,11 @@ static void test_FoldStringA(void) /* MAP_FOLDDIGITS */ SetLastError(0); ret = pFoldStringA(MAP_FOLDDIGITS, digits_src, -1, dst, 256); - if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("FoldStringA is not implemented\n"); return; + } ok(ret == 4, "Expected ret == 4, got %d, error %d\n", ret, GetLastError()); ok(strcmp(dst, digits_dst) == 0, "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", digits_dst, dst);
1
0
0
0
Andrew Nguyen : kernel32/tests: Correctly skip when the Unicode file functions are not available.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 38f7d54fe08718044e59732aa2f5f0ea79beddcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38f7d54fe08718044e59732aa…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:31 2009 -0500 kernel32/tests: Correctly skip when the Unicode file functions are not available. --- dlls/kernel32/tests/file.c | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 89b284d..86ad4e5 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -633,8 +633,11 @@ static void test_CopyFileW(void) DWORD ret; ret = GetTempPathW(MAX_PATH, temp_path); - if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetTempPathW is not available\n"); return; + } ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); @@ -720,8 +723,11 @@ static void test_CreateFileW(void) DWORD ret; ret = GetTempPathW(MAX_PATH, temp_path); - if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetTempPathW is not available\n"); return; + } ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); @@ -864,8 +870,11 @@ static void test_DeleteFileW( void ) static const WCHAR emptyW[]={'\0'}; ret = DeleteFileW(NULL); - if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("DeleteFileW is not available\n"); return; + } ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, "DeleteFileW(NULL) returned ret=%d error=%d\n",ret,GetLastError()); @@ -984,8 +993,11 @@ static void test_MoveFileW(void) DWORD ret; ret = GetTempPathW(MAX_PATH, temp_path); - if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetTempPathW is not available\n"); return; + } ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); @@ -2352,8 +2364,11 @@ static void test_ReplaceFileW(void) } ret = GetTempPathW(MAX_PATH, temp_path); - if (ret==0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetTempPathW is not available\n"); return; + } ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
1
0
0
0
Andrew Nguyen : kernel32/tests: Correctly skip tests when the Unicode drive functions are not available.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: a85dc859606b079dc9e4923b48141ec4c85fb743 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a85dc859606b079dc9e4923b4…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:26 2009 -0500 kernel32/tests: Correctly skip tests when the Unicode drive functions are not available. --- dlls/kernel32/tests/drive.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/drive.c b/dlls/kernel32/tests/drive.c index 98bc126..6bee4a7 100644 --- a/dlls/kernel32/tests/drive.c +++ b/dlls/kernel32/tests/drive.c @@ -62,9 +62,9 @@ static void test_GetDriveTypeW(void) for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) { type = GetDriveTypeW(drive); - if (type == DRIVE_UNKNOWN && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (type == DRIVE_UNKNOWN && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - /* Must be Win9x which doesn't support the Unicode functions */ + win_skip("GetDriveTypeW is not available on Win9x\n"); return; } ok(type > 0 && type <= 6, "not a valid drive %c: type %u\n", drive[0], type); @@ -165,9 +165,9 @@ static void test_GetDiskFreeSpaceW(void) static const WCHAR unix_style_root_pathW[] = { '/', 0 }; ret = GetDiskFreeSpaceW(NULL, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - if (ret == 0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - /* Must be Win9x which doesn't support the Unicode functions */ + win_skip("GetDiskFreeSpaceW is not available\n"); return; } ok(ret, "GetDiskFreeSpaceW error %d\n", GetLastError());
1
0
0
0
Andrew Nguyen : kernel32/tests: Correctly skip tests when the Unicode directory functions are not available .
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 4f7f110c5e39a3aeb94a6a75bc6894a5a08b2540 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f7f110c5e39a3aeb94a6a75b…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Mon May 18 04:24:20 2009 -0500 kernel32/tests: Correctly skip tests when the Unicode directory functions are not available. --- dlls/kernel32/tests/directory.c | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/tests/directory.c b/dlls/kernel32/tests/directory.c index a0ccd9f..8d1c457 100644 --- a/dlls/kernel32/tests/directory.c +++ b/dlls/kernel32/tests/directory.c @@ -61,8 +61,11 @@ static void test_GetWindowsDirectoryW(void) static const WCHAR fooW[] = {'f','o','o',0}; len_with_null = GetWindowsDirectoryW(NULL, 0); - if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetWindowsDirectoryW is not implemented\n"); return; + } ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); lstrcpyW(buf, fooW); @@ -124,8 +127,11 @@ static void test_GetSystemDirectoryW(void) static const WCHAR fooW[] = {'f','o','o',0}; len_with_null = GetSystemDirectoryW(NULL, 0); - if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("GetSystemDirectoryW is not available\n"); return; + } ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); lstrcpyW(buf, fooW); @@ -337,8 +343,11 @@ static void test_CreateDirectoryW(void) static const WCHAR questionW[] = {'?',0}; ret = CreateDirectoryW(NULL, NULL); - if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) + if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("CreateDirectoryW is not available\n"); return; + } ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, "should not create NULL path ret %u err %u\n", ret, GetLastError()); @@ -441,8 +450,11 @@ static void test_RemoveDirectoryW(void) GetTempPathW(MAX_PATH, tmpdir); lstrcatW(tmpdir, tmp_dir_name); ret = CreateDirectoryW(tmpdir, NULL); - if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - return; + if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip("CreateDirectoryW is not available\n"); + return; + } ok(ret == TRUE, "CreateDirectoryW should always succeed\n");
1
0
0
0
Paul Vriens : setupapi: Fix passing a NULL parameter (Coverity).
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 77fa32a8327b09a33080f78e2ce69123bbd3083c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77fa32a8327b09a33080f78e2…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri May 15 14:48:28 2009 +0200 setupapi: Fix passing a NULL parameter (Coverity). --- dlls/setupapi/misc.c | 6 ++++++ dlls/setupapi/tests/misc.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 36d52ba..a9efa2a 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -1139,6 +1139,12 @@ BOOL WINAPI SetupUninstallOEMInfW( PCWSTR inf_file, DWORD flags, PVOID reserved TRACE("%s, 0x%08x, %p\n", debugstr_w(inf_file), flags, reserved); + if (!inf_file) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!GetWindowsDirectoryW( target, sizeof(target)/sizeof(WCHAR) )) return FALSE; strcatW( target, infW ); diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index e110e22..4b8bd03 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -46,6 +46,7 @@ static CHAR CURR_DIR[MAX_PATH]; static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT); static BOOL (WINAPI *pSetupCopyOEMInfA)(PCSTR, PCSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR *); static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A); +static BOOL (WINAPI *pSetupUninstallOEMInfA)(PCSTR, DWORD, PVOID); static void create_inf_file(LPCSTR filename) { @@ -581,6 +582,32 @@ static void test_SetupDecompressOrCopyFile(void) DeleteFileA(source); } +static void test_SetupUninstallOEMInf(void) +{ + BOOL ret; + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA(NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA("", 0, NULL); + todo_wine + { + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + } + + SetLastError(0xdeadbeef); + ret = pSetupUninstallOEMInfA("nonexistent.inf", 0, NULL); + todo_wine + { + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + } +} + START_TEST(misc) { HMODULE hsetupapi = GetModuleHandle("setupapi.dll"); @@ -588,6 +615,7 @@ START_TEST(misc) pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA"); pSetupCopyOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupCopyOEMInfA"); pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA"); + pSetupUninstallOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupUninstallOEMInfA"); GetCurrentDirectoryA(MAX_PATH, CURR_DIR); @@ -604,4 +632,9 @@ START_TEST(misc) win_skip("SetupGetFileCompressionInfoExA is not available\n"); test_SetupDecompressOrCopyFile(); + + if (pSetupUninstallOEMInfA) + test_SetupUninstallOEMInf(); + else + win_skip("SetupUninstallOEMInfA is not available\n"); }
1
0
0
0
Juan Lang : inetmib1: Rename a poorly named variable.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 6a025c5a32b64d6379e3243b1120742dff6d9201 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a025c5a32b64d6379e3243b1…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri May 15 08:00:31 2009 -0700 inetmib1: Rename a poorly named variable. --- dlls/inetmib1/main.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c index 7ce0111..b0ff812 100644 --- a/dlls/inetmib1/main.c +++ b/dlls/inetmib1/main.c @@ -456,11 +456,11 @@ static AsnInteger32 getItemAndInstanceFromTable(AsnObjectIdentifier *oid, } else { - AsnObjectIdentifier ipOid = { instanceLen, + AsnObjectIdentifier instanceOid = { instanceLen, oid->ids + base->idLength + 1 }; - *instance = findNextOidInTable(&ipOid, table, tableEntrySize, - makeKey, compare); + *instance = findNextOidInTable(&instanceOid, table, + tableEntrySize, makeKey, compare); if (!*instance || *instance > table->numEntries) ret = SNMP_ERRORSTATUS_NOSUCHNAME; } @@ -477,10 +477,10 @@ static AsnInteger32 getItemAndInstanceFromTable(AsnObjectIdentifier *oid, ret = SNMP_ERRORSTATUS_NOSUCHNAME; else { - AsnObjectIdentifier ipOid = { instanceLen, + AsnObjectIdentifier instanceOid = { instanceLen, oid->ids + base->idLength + 1 }; - *instance = findOidInTable(&ipOid, table, tableEntrySize, + *instance = findOidInTable(&instanceOid, table, tableEntrySize, makeKey, compare); if (!*instance) ret = SNMP_ERRORSTATUS_NOSUCHNAME;
1
0
0
0
Aric Stewart : msctf/tests: Test TextService requesting an EditSession.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 8535f8c67056764a1cd9fe5cbad1bfce2aec71cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8535f8c67056764a1cd9fe5cb…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri May 15 14:10:16 2009 -0500 msctf/tests: Test TextService requesting an EditSession. --- dlls/msctf/tests/inputprocessor.c | 147 ++++++++++++++++++++++++++++++++++++- 1 files changed, 144 insertions(+), 3 deletions(-) diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index 3728711..a4d9979 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -54,6 +54,10 @@ static INT test_OnInitDocumentMgr = SINK_UNEXPECTED; static INT test_OnPushContext = SINK_UNEXPECTED; static INT test_OnPopContext = SINK_UNEXPECTED; static INT test_KEV_OnSetFocus = SINK_UNEXPECTED; +static INT test_ACP_AdviseSink = SINK_UNEXPECTED; +static INT test_ACP_GetStatus = SINK_UNEXPECTED; +static INT test_ACP_RequestLock = SINK_UNEXPECTED; +static INT test_DoEditSession = SINK_UNEXPECTED; /********************************************************************** @@ -63,6 +67,8 @@ typedef struct tagTextStoreACP { const ITextStoreACPVtbl *TextStoreACPVtbl; LONG refCount; + + ITextStoreACPSink *sink; } TextStoreACP; static void TextStoreACP_Destructor(TextStoreACP *This) @@ -109,7 +115,14 @@ static ULONG WINAPI TextStoreACP_Release(ITextStoreACP *iface) static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface, REFIID riid, IUnknown *punk, DWORD dwMask) { - trace("\n"); + TextStoreACP *This = (TextStoreACP *)iface; + HRESULT hr; + + ok(test_ACP_AdviseSink == SINK_EXPECTED, "Unexpected TextStoreACP_AdviseSink sink\n"); + test_ACP_AdviseSink = SINK_FIRED; + + hr = IUnknown_QueryInterface(punk, &IID_ITextStoreACPSink,(LPVOID*)(&This->sink)); + ok(SUCCEEDED(hr),"Unable to QueryInterface on sink\n"); return S_OK; } @@ -119,16 +132,25 @@ static HRESULT WINAPI TextStoreACP_UnadviseSink(ITextStoreACP *iface, trace("\n"); return S_OK; } + static HRESULT WINAPI TextStoreACP_RequestLock(ITextStoreACP *iface, DWORD dwLockFlags, HRESULT *phrSession) { - trace("\n"); + TextStoreACP *This = (TextStoreACP *)iface; + + ok(test_ACP_RequestLock == SINK_EXPECTED,"Unexpected TextStoreACP_RequestLock\n"); + test_ACP_RequestLock = SINK_FIRED; + test_DoEditSession = SINK_EXPECTED; + *phrSession = ITextStoreACPSink_OnLockGranted(This->sink, TS_LF_READWRITE); + ok(test_DoEditSession = SINK_FIRED,"expected DoEditSession not fired\n"); + ok(*phrSession == 0xdeadcafe,"Unexpected return from ITextStoreACPSink_OnLockGranted\n"); return S_OK; } static HRESULT WINAPI TextStoreACP_GetStatus(ITextStoreACP *iface, TS_STATUS *pdcs) { - trace("\n"); + ok(test_ACP_GetStatus == SINK_EXPECTED, "Unexpected TextStoreACP_GetStatus\n"); + test_ACP_GetStatus = SINK_FIRED; return S_OK; } static HRESULT WINAPI TextStoreACP_QueryInsert(ITextStoreACP *iface, @@ -1114,12 +1136,14 @@ static void test_startSession(void) cnt = check_context_refcount(cxt); test_OnPushContext = SINK_EXPECTED; + test_ACP_AdviseSink = SINK_EXPECTED; test_OnInitDocumentMgr = SINK_EXPECTED; hr = ITfDocumentMgr_Push(g_dm, cxt); ok(SUCCEEDED(hr),"Push Failed\n"); ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); ok(test_OnPushContext == SINK_FIRED, "OnPushContext sink not fired\n"); ok(test_OnInitDocumentMgr == SINK_FIRED, "OnInitDocumentMgr sink not fired\n"); + ok(test_ACP_AdviseSink == SINK_FIRED,"TextStoreACP_AdviseSink not fired\n"); hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); ok(SUCCEEDED(hr),"GetTop Failed\n"); @@ -1289,6 +1313,122 @@ static void test_ClientId(void) ITfClientId_Release(pcid); } +/********************************************************************** + * ITfEditSession + **********************************************************************/ +typedef struct tagEditSession +{ + const ITfEditSessionVtbl *EditSessionVtbl; + LONG refCount; +} EditSession; + +static void EditSession_Destructor(EditSession *This) +{ + HeapFree(GetProcessHeap(),0,This); +} + +static HRESULT WINAPI EditSession_QueryInterface(ITfEditSession *iface, REFIID iid, LPVOID *ppvOut) +{ + EditSession *This = (EditSession *)iface; + *ppvOut = NULL; + + if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfEditSession)) + { + *ppvOut = This; + } + + if (*ppvOut) + { + IUnknown_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI EditSession_AddRef(ITfEditSession *iface) +{ + EditSession *This = (EditSession *)iface; + return InterlockedIncrement(&This->refCount); +} + +static ULONG WINAPI EditSession_Release(ITfEditSession *iface) +{ + EditSession *This = (EditSession *)iface; + ULONG ret; + + ret = InterlockedDecrement(&This->refCount); + if (ret == 0) + EditSession_Destructor(This); + return ret; +} + +static HRESULT WINAPI EditSession_DoEditSession(ITfEditSession *iface, +TfEditCookie ec) +{ + ok(test_DoEditSession == SINK_EXPECTED, "Unexpected DoEditSession\n"); + ok(test_ACP_RequestLock == SINK_FIRED,"Expected RequestLock not fired\n"); + test_DoEditSession = SINK_FIRED; + return 0xdeadcafe; +} + +static const ITfEditSessionVtbl EditSession_EditSessionVtbl = +{ + EditSession_QueryInterface, + EditSession_AddRef, + EditSession_Release, + + EditSession_DoEditSession +}; + +HRESULT EditSession_Constructor(ITfEditSession **ppOut) +{ + EditSession *This; + + This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(EditSession)); + if (This == NULL) + return E_OUTOFMEMORY; + + This->EditSessionVtbl = &EditSession_EditSessionVtbl; + This->refCount = 1; + + *ppOut = (ITfEditSession*)This; + return S_OK; +} + +static void test_TStoApplicationText(void) +{ + HRESULT hr, hrSession; + ITfEditSession *es; + ITfContext *cxt; + ITfDocumentMgr *dm; + + ITfThreadMgr_GetFocus(g_tm, &dm); + EditSession_Constructor(&es); + ITfDocumentMgr_GetTop(dm,&cxt); + + hrSession = 0xfeedface; + /* Test no premissions flags */ + hr = ITfContext_RequestEditSession(cxt, tid, es, TF_ES_SYNC, &hrSession); + todo_wine ok(hr == E_INVALIDARG,"RequestEditSession should have failed with %x not %x\n",E_INVALIDARG,hr); + todo_wine ok(hrSession == E_FAIL,"hrSession should be %x not %x\n",E_FAIL,hrSession); + + hrSession = 0xfeedface; + test_ACP_GetStatus = SINK_EXPECTED; + test_ACP_RequestLock = SINK_EXPECTED; + hrSession = 0xfeedface; + hr = ITfContext_RequestEditSession(cxt, tid, es, TF_ES_SYNC|TF_ES_READWRITE, &hrSession); + todo_wine ok(SUCCEEDED(hr),"ITfContext_RequestEditSession failed\n"); + todo_wine ok(test_ACP_GetStatus == SINK_FIRED," expected GetStatus not fired\n"); + todo_wine ok(test_ACP_RequestLock == SINK_FIRED," expected RequestLock not fired\n"); + todo_wine ok(test_DoEditSession == SINK_FIRED," expected DoEditSession not fired\n"); + todo_wine ok(hrSession == 0xdeadcafe,"Unexpected hrSession\n"); + + ITfContext_Release(cxt); + ITfDocumentMgr_Release(dm); + ITfEditSession_Release(es); +} + START_TEST(inputprocessor) { if (SUCCEEDED(initialize())) @@ -1303,6 +1443,7 @@ START_TEST(inputprocessor) test_TfGuidAtom(); test_ClientId(); test_KeystrokeMgr(); + test_TStoApplicationText(); test_endSession(); test_EnumLanguageProfiles(); test_FindClosestCategory();
1
0
0
0
Aric Stewart : msctf: TfContext intitalization and uninitialization on Push and Pop.
by Alexandre Julliard
18 May '09
18 May '09
Module: wine Branch: master Commit: 7d4e1336247bb701e9e23ef4f36909793e70c25a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d4e1336247bb701e9e23ef4f…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri May 15 14:09:58 2009 -0500 msctf: TfContext intitalization and uninitialization on Push and Pop. --- dlls/msctf/context.c | 39 ++++++++++++++++++++++++++++++++------- dlls/msctf/documentmgr.c | 4 ++++ dlls/msctf/msctf_internal.h | 3 +++ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index dff4fd8..42ae71e 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -66,6 +66,7 @@ typedef struct tagContext { /* const ITfQueryEmbeddedVtbl *QueryEmbeddedVtbl; */ /* const ITfSourceSingleVtbl *SourceSingleVtbl; */ LONG refCount; + BOOL connected; TfClientId tidOwner; @@ -446,16 +447,12 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp This->SourceVtbl = &Context_SourceVtbl; This->refCount = 1; This->tidOwner = tidOwner; + This->connected = FALSE; if (punk) { - if (SUCCEEDED(IUnknown_QueryInterface(punk, &IID_ITextStoreACP, - (LPVOID*)&This->pITextStoreACP))) - { - if (SUCCEEDED(TextStoreACPSink_Constructor(&This->pITextStoreACPSink, This))) - ITextStoreACP_AdviseSink(This->pITextStoreACP, &IID_ITextStoreACPSink, - (IUnknown*)This->pITextStoreACPSink, TS_AS_ALL_SINKS); - } + IUnknown_QueryInterface(punk, &IID_ITextStoreACP, + (LPVOID*)&This->pITextStoreACP); IUnknown_QueryInterface(punk, &IID_ITfContextOwnerCompositionSink, (LPVOID*)&This->pITfContextOwnerCompositionSink); @@ -478,6 +475,34 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp return S_OK; } +HRESULT Context_Initialize(ITfContext *iface) +{ + Context *This = (Context *)iface; + + if (This->pITextStoreACP) + { + if (SUCCEEDED(TextStoreACPSink_Constructor(&This->pITextStoreACPSink, This))) + ITextStoreACP_AdviseSink(This->pITextStoreACP, &IID_ITextStoreACPSink, + (IUnknown*)This->pITextStoreACPSink, TS_AS_ALL_SINKS); + } + This->connected = TRUE; + return S_OK; +} + +HRESULT Context_Uninitialize(ITfContext *iface) +{ + Context *This = (Context *)iface; + + if (This->pITextStoreACPSink) + { + ITextStoreACP_UnadviseSink(This->pITextStoreACP, (IUnknown*)This->pITextStoreACPSink); + if (ITextStoreACPSink_Release(This->pITextStoreACPSink) == 0) + This->pITextStoreACPSink = NULL; + } + This->connected = FALSE; + return S_OK; +} + /************************************************************************** * ITextStoreACPSink **************************************************************************/ diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c index e1e5b19..7fd354a 100644 --- a/dlls/msctf/documentmgr.c +++ b/dlls/msctf/documentmgr.c @@ -138,6 +138,7 @@ static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic) This->contextStack[0] = check; ITfThreadMgrEventSink_OnPushContext(This->ThreadMgrSink,check); + Context_Initialize(check); return S_OK; } @@ -153,11 +154,13 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) { ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]); ITfContext_Release(This->contextStack[0]); + Context_Uninitialize(This->contextStack[0]); } if (This->contextStack[1]) { ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[1]); ITfContext_Release(This->contextStack[1]); + Context_Uninitialize(This->contextStack[1]); } This->contextStack[0] = This->contextStack[1] = NULL; ITfThreadMgrEventSink_OnUninitDocumentMgr(This->ThreadMgrSink, iface); @@ -172,6 +175,7 @@ static HRESULT WINAPI DocumentMgr_Pop(ITfDocumentMgr *iface, DWORD dwFlags) ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]); ITfContext_Release(This->contextStack[0]); + Context_Uninitialize(This->contextStack[0]); This->contextStack[0] = This->contextStack[1]; This->contextStack[1] = NULL; diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h index 15950ed..3dce778 100644 --- a/dlls/msctf/msctf_internal.h +++ b/dlls/msctf/msctf_internal.h @@ -35,6 +35,9 @@ extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfConte extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); extern HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut); +extern HRESULT Context_Initialize(ITfContext *cxt); +extern HRESULT Context_Uninitialize(ITfContext *cxt); + /* cookie function */ extern DWORD generate_Cookie(DWORD magic, LPVOID data); extern DWORD get_Cookie_magic(DWORD id);
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
80
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
Results per page:
10
25
50
100
200