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
February 2016
----- 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
2 participants
755 discussions
Start a n
N
ew thread
Charles Davis : winemac.drv: Don't print 32-bit values as long integers ( Clang).
by Alexandre Julliard
19 Feb '16
19 Feb '16
Module: wine Branch: master Commit: d2f7becc0f1394a8369f667f97096ceaa0db2122 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2f7becc0f1394a8369f667f9…
Author: Charles Davis <cdavis5x(a)gmail.com> Date: Thu Feb 18 13:17:03 2016 -0700 winemac.drv: Don't print 32-bit values as long integers (Clang). Signed-off-by: Charles Davis <cdavis5x(a)gmail.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/keyboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c index 6f38885..6680e6b 100644 --- a/dlls/winemac.drv/keyboard.c +++ b/dlls/winemac.drv/keyboard.c @@ -1545,7 +1545,7 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState INT ret = 0; int keyc; BOOL is_menu = (flags & 0x1); - OSStatus status; + int status; const UCKeyboardLayout *uchr; UInt16 keyAction; UInt32 modifierKeyState; @@ -1664,7 +1664,7 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState &len, bufW); if (status != noErr) { - ERR_(key)("Couldn't translate keycode 0x%04x, status %ld\n", keyc, status); + ERR_(key)("Couldn't translate keycode 0x%04x, status %d\n", keyc, status); goto done; } if (!is_menu) @@ -1687,7 +1687,7 @@ INT CDECL macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState &savedDeadKeyState, bufW_size, &len, bufW); if (status != noErr) { - ERR_(key)("Couldn't translate keycode 0x%04x, status %ld\n", keyc, status); + ERR_(key)("Couldn't translate keycode 0x%04x, status %d\n", keyc, status); goto done; }
1
0
0
0
YongHao Hu : msvcp110: Add tr2_sys__Symlink implementation and test.
by Alexandre Julliard
19 Feb '16
19 Feb '16
Module: wine Branch: master Commit: d6dcc253bf907e4e92f24821eb960e528c2f5485 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6dcc253bf907e4e92f24821e…
Author: YongHao Hu <christopherwuy(a)gmail.com> Date: Fri Feb 19 00:46:51 2016 +0800 msvcp110: Add tr2_sys__Symlink implementation and test. Signed-off-by: YongHao Hu <christopherwuy(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp110/msvcp110.spec | 4 +-- dlls/msvcp120/msvcp120.spec | 4 +-- dlls/msvcp120/tests/msvcp120.c | 65 +++++++++++++++++++++++++++++++++++++ dlls/msvcp120_app/msvcp120_app.spec | 4 +-- dlls/msvcp90/ios.c | 13 ++++++++ 5 files changed, 84 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 1df4c55..3d89924 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -1771,8 +1771,8 @@ @ cdecl -arch=arm ?_Swap_all@_Container_base12@std@@QAAXAAU12@@Z(ptr ptr) _Container_base12__Swap_all @ thiscall -arch=i386 ?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z(ptr ptr) _Container_base12__Swap_all @ cdecl -arch=win64 ?_Swap_all@_Container_base12@std@@QEAAXAEAU12@@Z(ptr ptr) _Container_base12__Swap_all -@ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z -@ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z +@ cdecl -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Symlink +@ cdecl -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Symlink @ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPB_W0@Z @ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEB_W0@Z @ extern ?_Sync@ios_base@std@@0_NA ios_base_Sync diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 626ead8..1bb487e 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1732,8 +1732,8 @@ @ cdecl -arch=arm ?_Swap_all@_Container_base12@std@@QAAXAAU12@@Z(ptr ptr) _Container_base12__Swap_all @ thiscall -arch=i386 ?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z(ptr ptr) _Container_base12__Swap_all @ cdecl -arch=win64 ?_Swap_all@_Container_base12@std@@QEAAXAEAU12@@Z(ptr ptr) _Container_base12__Swap_all -@ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z -@ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z +@ cdecl -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z(str str) tr2_sys__Symlink +@ cdecl -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z(str str) tr2_sys__Symlink @ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPB_W0@Z @ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEB_W0@Z @ extern ?_Sync@ios_base@std@@0_NA ios_base_Sync diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 1aaa251..f884d0c 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -133,6 +133,7 @@ static void* (__cdecl *p_tr2_sys__Open_dir)(char*, char const*, int *, enum file static char* (__cdecl *p_tr2_sys__Read_dir)(char*, void*, enum file_type*); static void (__cdecl *p_tr2_sys__Close_dir)(void*); static int (__cdecl *p_tr2_sys__Link)(char const*, char const*); +static int (__cdecl *p_tr2_sys__Symlink)(char const*, char const*); /* thrd */ typedef struct @@ -268,6 +269,8 @@ static BOOL init(void) "?_Close_dir@sys@tr2@std@@YAXPEAX@Z"); SET(p_tr2_sys__Link, "?_Link@sys@tr2@std@@YAHPEBD0@Z"); + SET(p_tr2_sys__Symlink, + "?_Symlink@sys@tr2@std@@YAHPEBD0@Z"); SET(p__Thrd_current, "_Thrd_current"); } else { @@ -323,6 +326,8 @@ static BOOL init(void) "?_Close_dir@sys@tr2@std@@YAXPAX@Z"); SET(p_tr2_sys__Link, "?_Link@sys@tr2@std@@YAHPBD0@Z"); + SET(p_tr2_sys__Symlink, + "?_Symlink@sys@tr2@std@@YAHPBD0@Z"); #ifdef __i386__ SET(p_i386_Thrd_current, "_Thrd_current"); @@ -1396,6 +1401,65 @@ static void test_tr2_sys__Link(void) ok(SetCurrentDirectoryA(current_path), "SetCurrentDirectoryA failed\n"); } +static void test_tr2_sys__Symlink(void) +{ + int ret, i; + HANDLE file; + LARGE_INTEGER file_size; + struct { + char const *existing_path; + char const *new_path; + int last_error; + MSVCP_bool is_todo; + } tests[] = { + { "f1", "f1_link", ERROR_SUCCESS, FALSE }, + { "f1", "tr2_test_dir\\f1_link", ERROR_SUCCESS, FALSE }, + { "tr2_test_dir\\f1_link", "tr2_test_dir\\f1_link_link", ERROR_SUCCESS, FALSE }, + { "tr2_test_dir", "dir_link", ERROR_SUCCESS, FALSE }, + { NULL, "NULL_link", ERROR_INVALID_PARAMETER, FALSE }, + { "f1", NULL, ERROR_INVALID_PARAMETER, FALSE }, + { "not_exist", "not_exist_link", ERROR_SUCCESS, FALSE }, + { "f1", "not_exist_dir\\f1_link", ERROR_PATH_NOT_FOUND, TRUE } + }; + + ret = p_tr2_sys__Make_dir("tr2_test_dir"); + ok(ret == 1, "test_tr2_sys__Make_dir(): expect 1 got %d\n", ret); + file = CreateFileA("f1", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "create file failed: INVALID_HANDLE_VALUE\n"); + file_size.QuadPart = 7; + ok(SetFilePointerEx(file, file_size, NULL, FILE_BEGIN), "SetFilePointerEx failed\n"); + ok(SetEndOfFile(file), "SetEndOfFile failed\n"); + CloseHandle(file); + + for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { + errno = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = p_tr2_sys__Symlink(tests[i].existing_path, tests[i].new_path); + if(!i && (ret==ERROR_PRIVILEGE_NOT_HELD || ret==ERROR_INVALID_FUNCTION)) { + win_skip("Privilege not held or symbolic link not supported, skipping symbolic link tests.\n"); + ok(DeleteFileA("f1"), "expect f1 to exist\n"); + ret = p_tr2_sys__Remove_dir("tr2_test_dir"); + ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret); + return; + } + + ok(errno == 0xdeadbeef, "tr2_sys__Symlink(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno); + todo_wine_if(tests[i].is_todo) + ok(ret == tests[i].last_error, "tr2_sys__Symlink(): test %d expect: %d, got %d\n", i+1, tests[i].last_error, ret); + if(ret == ERROR_SUCCESS) + ok(p_tr2_sys__File_size(tests[i].new_path) == 0, "tr2_sys__Symlink(): expect 0, got %s\n", debugstr_longlong(p_tr2_sys__File_size(tests[i].new_path))); + } + + ok(DeleteFileA("f1"), "expect f1 to exist\n"); + todo_wine ok(DeleteFileA("f1_link"), "expect f1_link to exist\n"); + todo_wine ok(DeleteFileA("tr2_test_dir/f1_link"), "expect tr2_test_dir/f1_link to exist\n"); + todo_wine ok(DeleteFileA("tr2_test_dir/f1_link_link"), "expect tr2_test_dir/f1_link_link to exist\n"); + todo_wine ok(DeleteFileA("not_exist_link"), "expect not_exist_link to exist\n"); + todo_wine ok(DeleteFileA("dir_link"), "expect dir_link to exist\n"); + ret = p_tr2_sys__Remove_dir("tr2_test_dir"); + ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret); +} + static int __cdecl thrd_thread(void *arg) { _Thrd_t *thr = arg; @@ -1686,6 +1750,7 @@ START_TEST(msvcp120) test_tr2_sys__Last_write_time(); test_tr2_sys__dir_operation(); test_tr2_sys__Link(); + test_tr2_sys__Symlink(); test_thrd(); test_cnd(); diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index 517e1b0..2d0a95b 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -1732,8 +1732,8 @@ @ cdecl -arch=arm ?_Swap_all@_Container_base12@std@@QAAXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base12@std@@QAAXAAU12@@Z @ thiscall -arch=i386 ?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base12@std@@QAEXAAU12@@Z @ cdecl -arch=win64 ?_Swap_all@_Container_base12@std@@QEAAXAEAU12@@Z(ptr ptr) msvcp120.?_Swap_all@_Container_base12@std@@QEAAXAEAU12@@Z -@ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z -@ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z +@ cdecl -arch=win32 ?_Symlink@sys@tr2@std@@YAHPBD0@Z(str str) msvcp120.?_Symlink@sys@tr2@std@@YAHPBD0@Z +@ cdecl -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEBD0@Z(str str) msvcp120.?_Symlink@sys@tr2@std@@YAHPEBD0@Z @ stub -arch=win32 ?_Symlink@sys@tr2@std@@YAHPB_W0@Z @ stub -arch=win64 ?_Symlink@sys@tr2@std@@YAHPEB_W0@Z @ extern ?_Sync@ios_base@std@@0_NA msvcp120.?_Sync@ios_base@std@@0_NA diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 12e2984..d9ff610 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -14769,6 +14769,19 @@ int __cdecl tr2_sys__Link(char const* existing_path, char const* new_path) return GetLastError(); } +/* ?_Symlink@sys@tr2@std@@YAHPBD0@Z */ +/* ?_Symlink@sys@tr2@std@@YAHPEBD0@Z */ +int __cdecl tr2_sys__Symlink(char const* existing_file_name, char const* file_name) +{ + TRACE("(%s %s)\n", debugstr_a(existing_file_name), debugstr_a(file_name)); + if(!existing_file_name || !file_name) + return ERROR_INVALID_PARAMETER; + + if(CreateSymbolicLinkA(file_name, existing_file_name, 0)) + return ERROR_SUCCESS; + return GetLastError(); +} + /* ??0strstream@std@@QAE@PADHH@Z */ /* ??0strstream@std@@QEAA@PEAD_JH@Z */ #if STREAMSIZE_BITS == 64
1
0
0
0
YongHao Hu : msvcp120/tests: Simplify tests by using todo_wine_if.
by Alexandre Julliard
19 Feb '16
19 Feb '16
Module: wine Branch: master Commit: 43bcc0d597a4e089d3e211a1a4053521108b8899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43bcc0d597a4e089d3e211a1a…
Author: YongHao Hu <christopherwuy(a)gmail.com> Date: Fri Feb 19 00:44:37 2016 +0800 msvcp120/tests: Simplify tests by using todo_wine_if. Signed-off-by: YongHao Hu <christopherwuy(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp120/tests/msvcp120.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 77a6050..1aaa251 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -966,14 +966,9 @@ static void test_tr2_sys__Copy_file(void) for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { errno = 0xdeadbeef; ret = p_tr2_sys__Copy_file(tests[i].source, tests[i].dest, tests[i].fail_if_exists); - if(tests[i].is_todo) - todo_wine ok(ret == tests[i].last_error || ret == tests[i].last_error2, - "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", - i+1, tests[i].last_error, ret); - else + todo_wine_if(tests[i].is_todo) ok(ret == tests[i].last_error || ret == tests[i].last_error2, - "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", - i+1, tests[i].last_error, ret); + "test_tr2_sys__Copy_file(): test %d expect: %d, got %d\n", i+1, tests[i].last_error, ret); ok(errno == 0xdeadbeef, "test_tr2_sys__Copy_file(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno); if(ret == ERROR_SUCCESS) ok(p_tr2_sys__File_size(tests[i].source) == p_tr2_sys__File_size(tests[i].dest), @@ -1166,10 +1161,7 @@ static void test_tr2_sys__Stat(void) for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) { err_code = 0xdeadbeef; val = p_tr2_sys__Stat(tests[i].path, &err_code); - if(tests[i].is_todo) - todo_wine ok(tests[i].ret == val, "tr2_sys__Stat(): test %d expect: %d, got %d\n", - i+1, tests[i].ret, val); - else + todo_wine_if(tests[i].is_todo) ok(tests[i].ret == val, "tr2_sys__Stat(): test %d expect: %d, got %d\n", i+1, tests[i].ret, val); ok(tests[i].err_code == err_code, "tr2_sys__Stat(): test %d err_code expect: %d, got %d\n", i+1, tests[i].err_code, err_code); @@ -1177,12 +1169,8 @@ static void test_tr2_sys__Stat(void) /* test tr2_sys__Lstat */ err_code = 0xdeadbeef; val = p_tr2_sys__Lstat(tests[i].path, &err_code); - if(tests[i].is_todo) - todo_wine ok(tests[i].ret == val, "tr2_sys__Lstat(): test %d expect: %d, got %d\n", - i+1, tests[i].ret, val); - else + todo_wine_if(tests[i].is_todo) ok(tests[i].ret == val, "tr2_sys__Lstat(): test %d expect: %d, got %d\n", i+1, tests[i].ret, val); - ok(tests[i].err_code == err_code, "tr2_sys__Lstat(): test %d err_code expect: %d, got %d\n", i+1, tests[i].err_code, err_code); }
1
0
0
0
Sebastian Lackner : ntdll/tests: Add more tests for calling int $0x2d on x86 and x86_64.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: d0b88e7454b72afa5c8317b46ea0d924edff9411 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0b88e7454b72afa5c8317b46…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 18 10:34:01 2016 +0100 ntdll/tests: Add more tests for calling int $0x2d on x86 and x86_64. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 190 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 8ec7408..94ccd7a 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -945,6 +945,13 @@ static void test_debugger(void) /* here we handle exception */ } } + else if (stage == 7 || stage == 8) + { + ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, + "expected EXCEPTION_BREAKPOINT, got %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode); + + if (stage == 8) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + } else ok(FALSE, "unexpected stage %x\n", stage); @@ -1339,6 +1346,8 @@ static void test_dpe_exceptions(void) #elif defined(__x86_64__) +#define is_wow64 0 + #define UNW_FLAG_NHANDLER 0 #define UNW_FLAG_EHANDLER 1 #define UNW_FLAG_UHANDLER 2 @@ -1865,6 +1874,181 @@ static void test_ripevent(DWORD numexc) pRtlRemoveVectoredExceptionHandler(vectored_handler); } +static DWORD debug_service_exceptions; + +static LONG CALLBACK debug_service_handler(EXCEPTION_POINTERS *ExceptionInfo) +{ + EXCEPTION_RECORD *rec = ExceptionInfo->ExceptionRecord; + trace("vect. handler %08x addr:%p\n", rec->ExceptionCode, rec->ExceptionAddress); + + ok(rec->ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode is %08x instead of %08x\n", + rec->ExceptionCode, EXCEPTION_BREAKPOINT); + +#ifdef __i386__ + ok(rec->NumberParameters == (is_wow64 ? 1 : 3), + "ExceptionParameters is %d instead of %d\n", rec->NumberParameters, is_wow64 ? 1 : 3); + ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Eax, + "expected ExceptionInformation[0] = %x, got %lx\n", + ExceptionInfo->ContextRecord->Eax, rec->ExceptionInformation[0]); + if (!is_wow64) + { + ok(rec->ExceptionInformation[1] == 0x11111111, + "got ExceptionInformation[1] = %lx\n", rec->ExceptionInformation[1]); + ok(rec->ExceptionInformation[2] == 0x22222222, + "got ExceptionInformation[2] = %lx\n", rec->ExceptionInformation[2]); + } +#else + ok(rec->NumberParameters == 1, + "ExceptionParameters is %d instead of 1\n", rec->NumberParameters); + ok(rec->ExceptionInformation[0] == ExceptionInfo->ContextRecord->Rax, + "expected ExceptionInformation[0] = %lx, got %lx\n", + ExceptionInfo->ContextRecord->Rax, rec->ExceptionInformation[0]); +#endif + + debug_service_exceptions++; + return (rec->ExceptionCode == EXCEPTION_BREAKPOINT) ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_CONTINUE_SEARCH; +} + +#ifdef __i386__ + +static const BYTE call_debug_service_code[] = { + 0x53, /* pushl %ebx */ + 0x57, /* pushl %edi */ + 0x8b, 0x44, 0x24, 0x0c, /* movl 12(%esp),%eax */ + 0xb9, 0x11, 0x11, 0x11, 0x11, /* movl $0x11111111,%ecx */ + 0xba, 0x22, 0x22, 0x22, 0x22, /* movl $0x22222222,%edx */ + 0xbb, 0x33, 0x33, 0x33, 0x33, /* movl $0x33333333,%ebx */ + 0xbf, 0x44, 0x44, 0x44, 0x44, /* movl $0x44444444,%edi */ + 0xcd, 0x2d, /* int $0x2d */ + 0xeb, /* jmp $+17 */ + 0x0f, 0x1f, 0x00, /* nop */ + 0x31, 0xc0, /* xorl %eax,%eax */ + 0xeb, 0x0c, /* jmp $+14 */ + 0x90, 0x90, 0x90, 0x90, /* nop */ + 0x90, 0x90, 0x90, 0x90, + 0x90, + 0x31, 0xc0, /* xorl %eax,%eax */ + 0x40, /* incl %eax */ + 0x5f, /* popl %edi */ + 0x5b, /* popl %ebx */ + 0xc3, /* ret */ +}; + +#else + +static const BYTE call_debug_service_code[] = { + 0x53, /* push %rbx */ + 0x57, /* push %rdi */ + 0x48, 0x89, 0xc8, /* movl %rcx,%rax */ + 0x48, 0xb9, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, /* movabs $0x1111111111111111,%rcx */ + 0x48, 0xba, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, /* movabs $0x2222222222222222,%rdx */ + 0x48, 0xbb, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, /* movabs $0x3333333333333333,%rbx */ + 0x48, 0xbf, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, /* movabs $0x4444444444444444,%rdi */ + 0xcd, 0x2d, /* int $0x2d */ + 0xeb, /* jmp $+17 */ + 0x0f, 0x1f, 0x00, /* nop */ + 0x48, 0x31, 0xc0, /* xor %rax,%rax */ + 0xeb, 0x0e, /* jmp $+16 */ + 0x90, 0x90, 0x90, 0x90, /* nop */ + 0x90, 0x90, 0x90, 0x90, + 0x48, 0x31, 0xc0, /* xor %rax,%rax */ + 0x48, 0xff, 0xc0, /* inc %rax */ + 0x5f, /* pop %rdi */ + 0x5b, /* pop %rbx */ + 0xc3, /* ret */ +}; + +#endif + +static void test_debug_service(DWORD numexc) +{ + const BOOL is_win64 = (sizeof(void *) > sizeof(int)); + DWORD (CDECL *func)(DWORD_PTR) = code_mem; + DWORD expected_exc, expected_ret; + void *vectored_handler; + DWORD ret; + + /* code will return 0 if execution resumes immediately after "int $0x2d", otherwise 1 */ + memcpy(code_mem, call_debug_service_code, sizeof(call_debug_service_code)); + + vectored_handler = pRtlAddVectoredExceptionHandler(TRUE, &debug_service_handler); + ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); + + expected_exc = numexc; + expected_ret = (numexc != 0); + + /* BREAKPOINT_BREAK */ + debug_service_exceptions = 0; + ret = func(0); + ok(debug_service_exceptions == expected_exc, + "BREAKPOINT_BREAK generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + todo_wine_if(is_win64) + ok(ret == expected_ret, + "BREAKPOINT_BREAK returned %u, expected %u\n", ret, expected_ret); + + /* BREAKPOINT_PROMPT */ + debug_service_exceptions = 0; + ret = func(2); + ok(debug_service_exceptions == expected_exc, + "BREAKPOINT_PROMPT generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + todo_wine_if(is_win64) + ok(ret == expected_ret, + "BREAKPOINT_PROMPT returned %u, expected %u\n", ret, expected_ret); + + /* invalid debug service */ + debug_service_exceptions = 0; + ret = func(6); + ok(debug_service_exceptions == expected_exc, + "invalid debug service generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + todo_wine_if(is_win64) + ok(ret == expected_ret, + "invalid debug service returned %u, expected %u\n", ret, expected_ret); + + expected_exc = (is_wow64 ? numexc : 0); + expected_ret = (is_wow64 && numexc); + + /* BREAKPOINT_PRINT */ + debug_service_exceptions = 0; + ret = func(1); + ok(debug_service_exceptions == expected_exc, + "BREAKPOINT_PRINT generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + ok(ret == expected_ret, + "BREAKPOINT_PRINT returned %u, expected %u\n", ret, expected_ret); + + /* BREAKPOINT_LOAD_SYMBOLS */ + debug_service_exceptions = 0; + ret = func(3); + ok(debug_service_exceptions == expected_exc, + "BREAKPOINT_LOAD_SYMBOLS generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + ok(ret == expected_ret, + "BREAKPOINT_LOAD_SYMBOLS returned %u, expected %u\n", ret, expected_ret); + + /* BREAKPOINT_UNLOAD_SYMBOLS */ + debug_service_exceptions = 0; + ret = func(4); + ok(debug_service_exceptions == expected_exc, + "BREAKPOINT_UNLOAD_SYMBOLS generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + ok(ret == expected_ret, + "BREAKPOINT_UNLOAD_SYMBOLS returned %u, expected %u\n", ret, expected_ret); + + /* BREAKPOINT_COMMAND_STRING */ + debug_service_exceptions = 0; + ret = func(5); + ok(debug_service_exceptions == expected_exc || broken(debug_service_exceptions == numexc), + "BREAKPOINT_COMMAND_STRING generated %u exceptions, expected %u\n", + debug_service_exceptions, expected_exc); + ok(ret == expected_ret || broken(ret == (numexc != 0)), + "BREAKPOINT_COMMAND_STRING returned %u, expected %u\n", ret, expected_ret); + + pRtlRemoveVectoredExceptionHandler(vectored_handler); +} + static void test_vectored_continue_handler(void) { PVOID handler1, handler2; @@ -1984,6 +2168,10 @@ START_TEST(exception) test_ripevent(0); test_stage = 6; test_ripevent(1); + test_stage = 7; + test_debug_service(0); + test_stage = 8; + test_debug_service(1); } else skip( "RtlRaiseException not found\n" ); @@ -1998,6 +2186,7 @@ START_TEST(exception) test_debug_registers(); test_outputdebugstring(1, FALSE); test_ripevent(1); + test_debug_service(1); test_vectored_continue_handler(); test_debugger(); test_simd_exceptions(); @@ -2018,6 +2207,7 @@ START_TEST(exception) test_debug_registers(); test_outputdebugstring(1, FALSE); test_ripevent(1); + test_debug_service(1); test_vectored_continue_handler(); test_virtual_unwind();
1
0
0
0
Sebastian Lackner : ntdll: Implement handling of int $0x2d for x86_64.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: e1d68b2e169580be8dc6f8927e01a19c60f79d65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1d68b2e169580be8dc6f8927…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 18 09:58:36 2016 +0100 ntdll: Implement handling of int $0x2d for x86_64. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_x86_64.c | 53 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 0c64541..be5a342 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2170,6 +2170,17 @@ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func fun } +/*********************************************************************** + * get_exception_context + * + * Get a pointer to the context built by setup_exception. + */ +static inline CONTEXT *get_exception_context( EXCEPTION_RECORD *rec ) +{ + return (CONTEXT *)rec - 1; /* cf. stack_layout structure */ +} + + /********************************************************************** * find_function_info */ @@ -2513,9 +2524,20 @@ static void raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) set_cpu_context( context ); } break; + case EXCEPTION_BREAKPOINT: + switch (rec->ExceptionInformation[0]) + { + case 1: /* BREAKPOINT_PRINT */ + case 3: /* BREAKPOINT_LOAD_SYMBOLS */ + case 4: /* BREAKPOINT_UNLOAD_SYMBOLS */ + case 5: /* BREAKPOINT_COMMAND_STRING (>= Win2003) */ + goto done; + } + break; } status = raise_exception( rec, context, TRUE ); if (status) raise_status( status, rec ); +done: set_cpu_context( context ); } @@ -2533,6 +2555,28 @@ static void raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) } +/*********************************************************************** + * handle_interrupt + * + * Handle an interrupt. + */ +static inline BOOL handle_interrupt( unsigned int interrupt, EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + switch(interrupt) + { + case 0x2d: + context->Rip += 3; + rec->ExceptionCode = EXCEPTION_BREAKPOINT; + rec->ExceptionAddress = (void *)context->Rip; + rec->NumberParameters = 1; + rec->ExceptionInformation[0] = context->Rax; + return TRUE; + default: + return FALSE; + } +} + + /********************************************************************** * segv_handler * @@ -2560,8 +2604,13 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) case TRAP_x86_SEGNPFLT: /* Segment not present exception */ case TRAP_x86_PROTFLT: /* General protection fault */ case TRAP_x86_UNKNOWN: /* Unknown fault code */ - rec->ExceptionCode = ERROR_sig(ucontext) ? EXCEPTION_ACCESS_VIOLATION : EXCEPTION_PRIV_INSTRUCTION; - rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION; + { + CONTEXT *win_context = get_exception_context( rec ); + WORD err = ERROR_sig(ucontext); + if ((err & 7) == 2 && handle_interrupt( err >> 3, rec, win_context )) break; + rec->ExceptionCode = err ? EXCEPTION_ACCESS_VIOLATION : EXCEPTION_PRIV_INSTRUCTION; + rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION; + } break; case TRAP_x86_PAGEFLT: /* Page fault */ rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION;
1
0
0
0
Sebastian Lackner : ntdll: Mimic Windows behaviour when calling debug service.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: 218bc84e03eaa807caca58027334e9b173dcfa7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=218bc84e03eaa807caca58027…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Feb 18 09:58:13 2016 +0100 ntdll: Mimic Windows behaviour when calling debug service. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_i386.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 10235fe..5708aae 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1940,6 +1940,21 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context goto done; } break; + case EXCEPTION_BREAKPOINT: + if (!is_wow64) + { + /* On Wow64, the upper DWORD of Rax contains garbage, and the debug + * service is usually not recognized when called from usermode. */ + switch (rec->ExceptionInformation[0]) + { + case 1: /* BREAKPOINT_PRINT */ + case 3: /* BREAKPOINT_LOAD_SYMBOLS */ + case 4: /* BREAKPOINT_UNLOAD_SYMBOLS */ + case 5: /* BREAKPOINT_COMMAND_STRING (>= Win2003) */ + goto done; + } + } + break; } status = NtRaiseException( rec, context, TRUE ); raise_status( status, rec );
1
0
0
0
Austin English : rasapi32: Add RasGetLinkStatistics stub.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: b0e122f41179363dfaca4b437fb2b2ff3844233d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0e122f41179363dfaca4b437…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Feb 18 12:01:40 2016 +0100 rasapi32: Add RasGetLinkStatistics stub. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rasapi32/rasapi.c | 6 ++++++ dlls/rasapi32/rasapi32.spec | 1 + include/ras.h | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/dlls/rasapi32/rasapi.c b/dlls/rasapi32/rasapi.c index 15061c5..fcd0cb8 100644 --- a/dlls/rasapi32/rasapi.c +++ b/dlls/rasapi32/rasapi.c @@ -539,3 +539,9 @@ DWORD WINAPI RasSetSubEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry, dwcbDeviceConfig); return 0; } + +DWORD WINAPI RasGetLinkStatistics(HRASCONN connection, DWORD entry, RAS_STATS *statistics) +{ + FIXME("(%p,%u,%p), stub!\n", connection, entry, statistics); + return 0; +} diff --git a/dlls/rasapi32/rasapi32.spec b/dlls/rasapi32/rasapi32.spec index f2ce65e..66b21a6 100644 --- a/dlls/rasapi32/rasapi32.spec +++ b/dlls/rasapi32/rasapi32.spec @@ -45,6 +45,7 @@ @ stdcall RasGetErrorStringW(long ptr long) @ stub RasGetErrorStringWow @ stub RasGetHport +@ stdcall RasGetLinkStatistics(ptr long ptr) @ stdcall RasGetProjectionInfoA(ptr ptr ptr ptr) @ stdcall RasGetProjectionInfoW(ptr ptr ptr ptr) @ stub RasGetSubEntryHandleA diff --git a/include/ras.h b/include/ras.h index 9e5d564..a8c04da 100644 --- a/include/ras.h +++ b/include/ras.h @@ -426,6 +426,24 @@ typedef struct tagRASAUTODIALENTRYW WCHAR szEntry[ RAS_MaxEntryName + 1 ]; } RASAUTODIALENTRYW, *LPRASAUTODIALENTRYW; +typedef struct _RAS_STATS +{ + DWORD dwSize; + DWORD dwBytesXmited; + DWORD dwBytesRcved; + DWORD dwFramesXmited; + DWORD dwFramesRcved; + DWORD dwCrcErr; + DWORD dwTimeoutErr; + DWORD dwAlignmentErr; + DWORD dwHardwareOverrunErr; + DWORD dwFramingErr; + DWORD dwBufferOverrunErr; + DWORD dwCompressionRatioIn; + DWORD dwCompressionRatioOut; + DWORD dwBps; + DWORD dwConnectDuration; +} RAS_STATS, *PRAS_STATS; DWORD WINAPI RasConnectionNotificationA(HRASCONN,HANDLE,DWORD); DWORD WINAPI RasConnectionNotificationW(HRASCONN,HANDLE,DWORD);
1
0
0
0
Austin English : wlanapi: Add a stub for WlanEnumInterfaces.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: d92dc216f29223b63be086d1262c1a78ef1416a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d92dc216f29223b63be086d12…
Author: Austin English <austinenglish(a)gmail.com> Date: Sun Jan 24 21:32:20 2016 -0600 wlanapi: Add a stub for WlanEnumInterfaces. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wlanapi/main.c | 8 ++++++++ dlls/wlanapi/wlanapi.spec | 2 +- include/Makefile.in | 1 + include/wlanapi.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/dlls/wlanapi/main.c b/dlls/wlanapi/main.c index 0b0d100..3674f79 100644 --- a/dlls/wlanapi/main.c +++ b/dlls/wlanapi/main.c @@ -24,8 +24,16 @@ #include "winbase.h" #include "wine/debug.h" +#include "wlanapi.h" + WINE_DEFAULT_DEBUG_CHANNEL(wlanapi); +DWORD WINAPI WlanEnumInterfaces(HANDLE client, void *reserved, WLAN_INTERFACE_INFO_LIST **interface_list) +{ + FIXME("(%p, %p, %p) stub\n", client, reserved, interface_list); + return ERROR_CALL_NOT_IMPLEMENTED; +} + DWORD WINAPI WlanOpenHandle(DWORD clientVersion, PVOID reserved, PDWORD negotiatedVersion, PHANDLE clientHandle) { diff --git a/dlls/wlanapi/wlanapi.spec b/dlls/wlanapi/wlanapi.spec index 79f9e43..e55bf06 100644 --- a/dlls/wlanapi/wlanapi.spec +++ b/dlls/wlanapi/wlanapi.spec @@ -3,7 +3,7 @@ @ stub WlanConnect @ stub WlanDeleteProfile @ stub WlanDisconnect -@ stub WlanEnumInterfaces +@ stdcall WlanEnumInterfaces(long ptr ptr) @ stub WlanExtractPsdIEDataList @ stub WlanFreeMemory @ stub WlanGetAvailableNetworkList diff --git a/include/Makefile.in b/include/Makefile.in index 8224e28..ff1f5a6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -655,6 +655,7 @@ HEADER_SRCS = \ winuser.h \ winuser.rh \ winver.h \ + wlanapi.h \ wmistr.h \ wnaspi32.h \ wownt32.h \ diff --git a/include/wlanapi.h b/include/wlanapi.h new file mode 100644 index 0000000..63922be --- /dev/null +++ b/include/wlanapi.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2016 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _WLAN_WLANAPI_H +#define _WLAN_WLANAPI_H + +typedef enum _WLAN_INTERFACE_STATE +{ + wlan_interface_state_not_ready, + wlan_interface_state_connected, + wlan_interface_state_ad_hoc_network_formed, + wlan_interface_state_disconnecting, + wlan_interface_state_disconnected, + wlan_interface_state_associating, + wlan_interface_state_discovering, + wlan_interface_state_authenticating +} WLAN_INTERFACE_STATE, *PWLAN_INTERFACE_STATE; + +typedef struct _WLAN_INTERFACE_INFO +{ + GUID InterfaceGuid; + WCHAR strInterfaceDescription[256]; + WLAN_INTERFACE_STATE isState; +} WLAN_INTERFACE_INFO, *PWLAN_INTERFACE_INFO; + +typedef struct _WLAN_INTERFACE_INFO_LIST +{ + DWORD dwNumberOfItems; + DWORD dwIndex; + WLAN_INTERFACE_INFO InterfaceInfo[1]; +} WLAN_INTERFACE_INFO_LIST, *PWLAN_INTERFACE_INFO_LIST; + +DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **); +DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *); + +#endif /* _WLAN_WLANAPI_H */
1
0
0
0
Alexandre Julliard : user32/tests: Add another test for dialog creation messages without DefDlgProc.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: c1ed920e151c4ecc06bd64a8df1139815e47ac47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1ed920e151c4ecc06bd64a8d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 18 22:18:56 2016 +0900 user32/tests: Add another test for dialog creation messages without DefDlgProc. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 74 +++++++++++++++++++++++++++++++++++++++++++ dlls/user32/tests/resource.rc | 9 ++++++ 2 files changed, 83 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 1ef7841..3d4bea5 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11942,6 +11942,35 @@ static INT_PTR WINAPI test_dlg_proc2(HWND hwnd, UINT message, WPARAM wParam, LPA return 1; } +static INT_PTR WINAPI test_dlg_proc3(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + ok( 0, "should not be called since DefDlgProc is not used\n" ); + return 0; +} + +static LRESULT WINAPI test_dlg_proc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + struct recvd_message msg; + + if (!ignore_message( message )) + { + msg.hwnd = hwnd; + msg.message = message; + msg.flags = sent|wparam|lparam|parent; + msg.wParam = wParam; + msg.lParam = lParam; + msg.descr = "dialog"; + add_message(&msg); + } + if (message == WM_INITDIALOG) + { + orig_edit_proc = (WNDPROC)SetWindowLongPtrW(GetDlgItem(hwnd, 200), + GWLP_WNDPROC, (LONG_PTR)dlg_creation_edit_proc); + return 1; + } + return DefWindowProcW( hwnd, message, wParam, lParam ); +} + static const struct message WmDefDlgSetFocus_1[] = { { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, { WM_GETTEXTLENGTH, sent|wparam|lparam|optional, 0, 0 }, /* XP */ @@ -12024,6 +12053,41 @@ static const struct message WmCreateDialogParamSeq_3[] = { { 0 } }; +static const struct message WmCreateDialogParamSeq_4[] = { + { HCBT_CREATEWND, hook }, + { WM_NCCREATE, sent|parent }, + { WM_NCCALCSIZE, sent|parent|wparam, 0 }, + { WM_CREATE, sent|parent }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, + { WM_SIZE, sent|parent|wparam, SIZE_RESTORED }, + { WM_MOVE, sent|parent }, + { WM_SETFONT, sent|parent }, + { WM_INITDIALOG, sent|parent }, + { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, + { EM_SETSEL, sent|wparam|lparam, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { HCBT_ACTIVATE, hook }, + { WM_QUERYNEWPALETTE, sent|parent|optional }, /* TODO: this message should not be sent */ + { WM_WINDOWPOSCHANGING, sent|parent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, + { WM_WINDOWPOSCHANGING, sent|parent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, + { WM_ACTIVATEAPP, sent|parent|wparam, 1 }, + { WM_NCACTIVATE, sent|parent }, + { WM_ACTIVATE, sent|parent|wparam, 1 }, + { HCBT_SETFOCUS, hook }, + { WM_SETFOCUS, sent|parent }, + { WM_KILLFOCUS, sent|parent }, + { WM_SETFOCUS, sent }, + { WM_COMMAND, sent|parent|wparam, MAKELONG(200, EN_SETFOCUS) }, + { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, + { WM_USER, sent|parent }, + { WM_CHANGEUISTATE, sent|parent|optional }, + { WM_UPDATEUISTATE, sent|parent|optional }, + { WM_UPDATEUISTATE, sent|optional }, + { 0 } +}; + static void test_dialog_messages(void) { WNDCLASSA cls; @@ -12133,6 +12197,16 @@ static void test_dialog_messages(void) DestroyWindow(hdlg); flush_sequence(); + UnregisterClassA( cls.lpszClassName, cls.hInstance ); + cls.lpfnWndProc = test_dlg_proc4; + ok( RegisterClassA(&cls), "failed to register class again\n" ); + hdlg = CreateDialogParamA(0, "FOCUS_TEST_DIALOG_4", 0, test_dlg_proc3, 0); + ok(IsWindow(hdlg), "CreateDialogParam failed\n"); + ok_sequence(WmCreateDialogParamSeq_4, "CreateDialogParam_4", TRUE); + EndDialog(hdlg, 0); + DestroyWindow(hdlg); + flush_sequence(); + UnregisterClassA(cls.lpszClassName, cls.hInstance); } diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc index fdef5a9..f116b85 100644 --- a/dlls/user32/tests/resource.rc +++ b/dlls/user32/tests/resource.rc @@ -115,6 +115,15 @@ FONT 8, "MS Shell Dlg" EDITTEXT 200,4,4,50,14 } +FOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Test dialog" +CLASS "MyDialogClass" +FONT 8, "MS Shell Dlg" +{ + EDITTEXT 200,4,4,50,14 +} + IDD_DIALOG DIALOG 0, 0, 186, 95 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog"
1
0
0
0
Piotr Caban : user32/tests: Add more dialog creation message tests.
by Alexandre Julliard
18 Feb '16
18 Feb '16
Module: wine Branch: master Commit: e7aabc640daff9ec3139e3a755b969a013335411 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7aabc640daff9ec3139e3a75…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Feb 16 14:49:23 2016 +0100 user32/tests: Add more dialog creation message tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index d15a8e7..1ef7841 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11901,6 +11901,47 @@ static INT_PTR WINAPI test_dlg_proc(HWND hwnd, UINT message, WPARAM wParam, LPAR return 1; } +static WNDPROC orig_edit_proc; +static LRESULT WINAPI dlg_creation_edit_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) +{ + struct recvd_message msg; + + if (ignore_message( message )) return 0; + + msg.hwnd = hwnd; + msg.message = message; + msg.flags = sent|wparam|lparam; + msg.wParam = wp; + msg.lParam = lp; + msg.descr = "edit"; + add_message(&msg); + + return CallWindowProcW(orig_edit_proc, hwnd, message, wp, lp); +} + +static INT_PTR WINAPI test_dlg_proc2(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + struct recvd_message msg; + + if (ignore_message( message )) return 0; + + msg.hwnd = hwnd; + msg.message = message; + msg.flags = sent|wparam|lparam|parent; + msg.wParam = wParam; + msg.lParam = lParam; + msg.descr = "dialog"; + add_message(&msg); + + if (message == WM_INITDIALOG) + { + orig_edit_proc = (WNDPROC)SetWindowLongPtrW(GetDlgItem(hwnd, 200), + GWLP_WNDPROC, (LONG_PTR)dlg_creation_edit_proc); + } + + return 1; +} + static const struct message WmDefDlgSetFocus_1[] = { { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, { WM_GETTEXTLENGTH, sent|wparam|lparam|optional, 0, 0 }, /* XP */ @@ -11959,6 +12000,30 @@ static const struct message WmCreateDialogParamSeq_2[] = { { 0 } }; +static const struct message WmCreateDialogParamSeq_3[] = { + { HCBT_CREATEWND, hook }, + { WM_SETFONT, sent|parent }, + { WM_INITDIALOG, sent|parent }, + { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, + { EM_SETSEL, sent|wparam|lparam, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { EM_SETSEL, sent|wparam|lparam|optional, 0, INT_MAX }, + { HCBT_ACTIVATE, hook }, + { WM_QUERYNEWPALETTE, sent|parent|optional }, /* TODO: this message should not be sent */ + { WM_WINDOWPOSCHANGING, sent|parent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, + { WM_WINDOWPOSCHANGING, sent|parent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, + { WM_ACTIVATEAPP, sent|parent|wparam, 1 }, + { WM_NCACTIVATE, sent|parent }, + { WM_ACTIVATE, sent|parent|wparam, 1 }, + { WM_SETFOCUS, sent }, + { WM_COMMAND, sent|parent|wparam, MAKELONG(200, EN_SETFOCUS) }, + { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, + { WM_USER, sent|parent }, + { WM_CHANGEUISTATE, sent|parent|optional }, + { 0 } +}; + static void test_dialog_messages(void) { WNDCLASSA cls; @@ -12061,6 +12126,13 @@ static void test_dialog_messages(void) DestroyWindow(hdlg); flush_sequence(); + hdlg = CreateDialogParamA(0, "FOCUS_TEST_DIALOG_3", 0, test_dlg_proc2, 0); + ok(IsWindow(hdlg), "CreateDialogParam failed\n"); + ok_sequence(WmCreateDialogParamSeq_3, "CreateDialogParam_3", TRUE); + EndDialog(hdlg, 0); + DestroyWindow(hdlg); + flush_sequence(); + UnregisterClassA(cls.lpszClassName, cls.hInstance); }
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
76
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
Results per page:
10
25
50
100
200