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
April 2018
----- 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
542 discussions
Start a n
N
ew thread
Anton Romanov : wmp: Stub IWMPNetwork get download/buffering progress.
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: 6e2c61187098bb1cab3b785855074efc39aba59f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e2c61187098bb1cab3b7858…
Author: Anton Romanov <theli.ua(a)gmail.com> Date: Thu Apr 19 22:45:31 2018 -0700 wmp: Stub IWMPNetwork get download/buffering progress. Signed-off-by: Anton Romanov <theli.ua(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wmp/player.c | 27 +++++++++++++++++++++++---- dlls/wmp/tests/media.c | 16 ++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c index 0a6d598..df395cb 100644 --- a/dlls/wmp/player.c +++ b/dlls/wmp/player.c @@ -1150,8 +1150,17 @@ static HRESULT WINAPI WMPNetwork_get_bufferingCount(IWMPNetwork *iface, LONG *pl static HRESULT WINAPI WMPNetwork_get_bufferingProgress(IWMPNetwork *iface, LONG *plBufferingProgress) { WindowsMediaPlayer *This = impl_from_IWMPNetwork(iface); - FIXME("(%p)->(%p)\n", This, plBufferingProgress); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, plBufferingProgress); + if (!This->filter_graph) { + return S_FALSE; + } + /* Ideally we would use IAMOpenProgress for URL reader but we don't have it in wine (yet) + * For file sources FileAsyncReader->Length should work + * */ + FIXME("stub: Returning buffering progress 100\n"); + *plBufferingProgress = 100; + + return S_OK; } static HRESULT WINAPI WMPNetwork_get_bufferingTime(IWMPNetwork *iface, LONG *plBufferingTime) @@ -1276,8 +1285,18 @@ static HRESULT WINAPI WMPNetwork_put_maxBandwidth(IWMPNetwork *iface, LONG lMaxB static HRESULT WINAPI WMPNetwork_get_downloadProgress(IWMPNetwork *iface, LONG *plDownloadProgress) { WindowsMediaPlayer *This = impl_from_IWMPNetwork(iface); - FIXME("(%p)->(%p)\n", This, plDownloadProgress); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, plDownloadProgress); + if (!This->filter_graph) { + return S_FALSE; + } + /* Ideally we would use IAMOpenProgress for URL reader but we don't have it in wine (yet) + * For file sources FileAsyncReader->Length could work or it should just be + * 100 + * */ + FIXME("stub: Returning download progress 100\n"); + *plDownloadProgress = 100; + + return S_OK; } static HRESULT WINAPI WMPNetwork_get_encodedFrameRate(IWMPNetwork *iface, LONG *plFrameRate) diff --git a/dlls/wmp/tests/media.c b/dlls/wmp/tests/media.c index 2372763..fbbd329 100644 --- a/dlls/wmp/tests/media.c +++ b/dlls/wmp/tests/media.c @@ -303,8 +303,10 @@ static BOOL test_wmp(void) static DWORD dw = 100; IWMPSettings *settings; BOOL test_ran = TRUE; + IWMPNetwork *network; DOUBLE duration; VARIANT_BOOL vbool; + LONG progress; IWMPMedia *media; static const WCHAR currentPosition[] = {'c','u','r','r','e','n','t','P','o','s','i','t','i','o','n',0}; BSTR bstrcurrentPosition = SysAllocString(currentPosition); @@ -416,6 +418,20 @@ static BOOL test_wmp(void) ok(round(duration) == 3, "unexpected value: %f\n", duration); IWMPMedia_Release(media); + network = NULL; + hres = IWMPPlayer4_get_network(player4, &network); + ok(hres == S_OK, "get_network failed: %08x\n", hres); + ok(network != NULL, "network = NULL\n"); + progress = 0; + hres = IWMPNetwork_get_bufferingProgress(network, &progress); + ok(hres == S_OK || broken(hres == S_FALSE), "IWMPNetwork_get_bufferingProgress failed: %08x\n", hres); + ok(progress == 100, "unexpected value: %d\n", progress); + progress = 0; + hres = IWMPNetwork_get_downloadProgress(network, &progress); + ok(hres == S_OK, "IWMPNetwork_get_downloadProgress failed: %08x\n", hres); + ok(progress == 100, "unexpected value: %d\n", progress); + IWMPNetwork_Release(network); + SET_EXPECT(PLAYSTATE, wmppsStopped); /* The following happens on wine only since we close media on stop */ SET_EXPECT(OPENSTATE, wmposPlaylistOpenNoMedia);
1
0
0
0
Alistair Leslie-Hughes : shell32: Implement SHCreateSessionKey.
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: a7124722aa9f98582608f8f77b6b2f912c6149a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a7124722aa9f98582608f8f7…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Apr 19 09:59:36 2018 +0000 shell32: Implement SHCreateSessionKey. Based on a patch by Dmitry Timoshkov. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shellreg.c | 25 ++++++++++++++++++++++--- dlls/shell32/tests/shellole.c | 25 +++++++++++++++++++++---- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c index 356ec4e..2ecd0af 100644 --- a/dlls/shell32/shellreg.c +++ b/dlls/shell32/shellreg.c @@ -33,6 +33,7 @@ #include "winreg.h" #include "undocshell.h" +#include "shell32_main.h" #include "wine/debug.h" @@ -154,7 +155,25 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey) */ HRESULT WINAPI SHCreateSessionKey(REGSAM access, HKEY *hkey) { - FIXME("stub: %d %p\n", access, hkey); - *hkey = NULL; - return E_NOTIMPL; + static const WCHAR session_format[] = { + 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\','S','e','s','s','i','o','n','I','n','f','o','\\','%','u',0}; + DWORD session, ret; + WCHAR str[ARRAY_SIZE(session_format) + 16]; + + if (hkey) + *hkey = NULL; + + if (!access) + return E_ACCESSDENIED; + + if (!ProcessIdToSessionId(GetCurrentProcessId(), &session)) + return E_INVALIDARG; + + sprintfW(str, session_format, session); + TRACE("using session key %s\n", debugstr_w(str)); + + ret = RegCreateKeyExW(HKEY_CURRENT_USER, str, 0, NULL, REG_OPTION_VOLATILE, access, NULL, hkey, NULL); + return HRESULT_FROM_WIN32( ret ); } diff --git a/dlls/shell32/tests/shellole.c b/dlls/shell32/tests/shellole.c index f611faf..4144f18 100644 --- a/dlls/shell32/tests/shellole.c +++ b/dlls/shell32/tests/shellole.c @@ -862,8 +862,15 @@ static void test_DragQueryFile(void) static void test_SHCreateSessionKey(void) { + static const WCHAR session_format[] = { + 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'E','x','p','l','o','r','e','r','\\','S','e','s','s','i','o','n','I','n','f','o','\\','%','u',0}; HKEY hkey, hkey2; HRESULT hr; + DWORD session; + WCHAR sessionW[(sizeof(session_format)/sizeof(WCHAR)) + 16]; + LONG ret; if (!pSHCreateSessionKey) { @@ -876,18 +883,28 @@ static void test_SHCreateSessionKey(void) hkey = (HKEY)0xdeadbeef; hr = pSHCreateSessionKey(0, &hkey); - todo_wine ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr); + ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr); ok(hkey == NULL, "got %p\n", hkey); hr = pSHCreateSessionKey(KEY_READ, &hkey); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08x\n", hr); hr = pSHCreateSessionKey(KEY_READ, &hkey2); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hkey != hkey2, "got %p, %p\n", hkey, hkey2); RegCloseKey(hkey); RegCloseKey(hkey2); + + /* check the registry */ + ProcessIdToSessionId( GetCurrentProcessId(), &session); + if (session) + { + wsprintfW(sessionW, session_format, session); + ret = RegOpenKeyW(HKEY_CURRENT_USER, sessionW, &hkey); + ok(!ret, "key not found\n"); + RegCloseKey(hkey); + } } static void test_dragdrophelper(void)
1
0
0
0
Alexandre Julliard : joy.cpl: Add a 256x256 icon.
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: 80a19b613f3b314d85d43140a8cf4e684bdf45a3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=80a19b613f3b314d85d43140…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 20 17:17:17 2018 +0200 joy.cpl: Add a 256x256 icon. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/joy.cpl/joy.ico | Bin 25214 -> 54079 bytes dlls/joy.cpl/joy.svg | 2156 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 1898 insertions(+), 258 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=80a19b613f3b314d85d4…
1
0
0
0
Alexandre Julliard : shell32: Add 256x256 variants of the standard icons.
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: e8976ceeab3b8da266ec9b16e8cae8598d1231dc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e8976ceeab3b8da266ec9b16…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 20 17:17:10 2018 +0200 shell32: Add 256x256 variants of the standard icons. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/cdrom.ico | Bin 25214 -> 36364 bytes dlls/shell32/cdrom.svg | 1182 ++++++++++++++++++++--- dlls/shell32/control.ico | Bin 25214 -> 45698 bytes dlls/shell32/control.svg | 2125 +++++++++++++++++++++++++++++++++++++----- dlls/shell32/delete.ico | Bin 13942 -> 55048 bytes dlls/shell32/delete.svg | 2047 +++++++++++++++++++++++++++++++++++----- dlls/shell32/desktop.ico | Bin 25214 -> 37129 bytes dlls/shell32/desktop.svg | 730 +++++++++++++-- dlls/shell32/document.ico | Bin 25214 -> 31561 bytes dlls/shell32/document.svg | 1224 +++++++++++++++++++++--- dlls/shell32/drive.ico | Bin 25214 -> 34754 bytes dlls/shell32/drive.svg | 1133 +++++++++++++++++++--- dlls/shell32/floppy.ico | Bin 25214 -> 32373 bytes dlls/shell32/floppy.svg | 853 ++++++++++++++--- dlls/shell32/folder.ico | Bin 25214 -> 37009 bytes dlls/shell32/folder.svg | 1007 +++++++++++++++++--- dlls/shell32/folder_open.ico | Bin 25214 -> 38165 bytes dlls/shell32/folder_open.svg | 1095 +++++++++++++++++++--- dlls/shell32/mycomputer.ico | Bin 25214 -> 50754 bytes dlls/shell32/mycomputer.svg | 854 +++++++++++------ dlls/shell32/mydocs.ico | Bin 25214 -> 39112 bytes dlls/shell32/mydocs.svg | 1693 +++++++++++++++++++++++++++++---- dlls/shell32/netdrive.ico | Bin 25214 -> 37244 bytes dlls/shell32/netdrive.svg | 1757 +++++++++++++++++++++++++++++----- dlls/shell32/netdrive2.ico | Bin 25214 -> 43380 bytes dlls/shell32/netdrive2.svg | 1861 +++++++++++++++++++++++++++++++----- dlls/shell32/printer.ico | Bin 25214 -> 35182 bytes dlls/shell32/printer.svg | 1222 +++++++++++++++++++++--- dlls/shell32/ramdisk.ico | Bin 25470 -> 36262 bytes dlls/shell32/ramdisk.svg | 1704 ++++++++++++++++++++++++++++++--- dlls/shell32/shortcut.ico | Bin 25214 -> 29643 bytes dlls/shell32/shortcut.svg | 287 +++++- dlls/shell32/trash_file.ico | Bin 25214 -> 48203 bytes dlls/shell32/trash_file.svg | 1024 +++++++++++++++++--- 34 files changed, 19073 insertions(+), 2725 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e8976ceeab3b8da266ec…
1
0
0
0
Alexandre Julliard : user32: Add 256x256 variants of the standard icons.
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: ecf0bef5613c379e80e40a47f32ee27c58f42443 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ecf0bef5613c379e80e40a47…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 20 17:16:51 2018 +0200 user32: Add 256x256 variants of the standard icons. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/resources/oic_bang.ico | Bin 25214 -> 41061 bytes dlls/user32/resources/oic_bang.svg | 452 ++++++++++- dlls/user32/resources/oic_hand.ico | Bin 25214 -> 48346 bytes dlls/user32/resources/oic_hand.svg | 549 +++++++++++-- dlls/user32/resources/oic_note.ico | Bin 25214 -> 47823 bytes dlls/user32/resources/oic_note.svg | 430 ++++++++-- dlls/user32/resources/oic_ques.ico | Bin 25214 -> 47818 bytes dlls/user32/resources/oic_ques.svg | 453 +++++++++-- dlls/user32/resources/oic_sample.ico | Bin 25214 -> 28310 bytes dlls/user32/resources/oic_sample.svg | 551 +++++++++++-- dlls/user32/resources/oic_shield.ico | Bin 34494 -> 57805 bytes dlls/user32/resources/oic_shield.svg | 246 ++++-- dlls/user32/resources/oic_winlogo.ico | Bin 25214 -> 48230 bytes dlls/user32/resources/oic_winlogo.svg | 1435 ++++++++++++++++++++++++++++----- 14 files changed, 3570 insertions(+), 546 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ecf0bef5613c379e80e4…
1
0
0
0
Dmitry Timoshkov : mstask: Implement IPersistFile::Save().
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: e4b7334574383d4369c61e07f118fbccdb8e7a0e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4b7334574383d4369c61e07…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 20 16:37:31 2018 +0800 mstask: Implement IPersistFile::Save(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 279 insertions(+), 8 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 19bd919..d64860a 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -33,6 +33,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(mstask); typedef struct { + USHORT product_version; + USHORT file_version; + UUID uuid; + USHORT name_size_offset; + USHORT trigger_offset; + USHORT error_retry_count; + USHORT error_retry_interval; + USHORT idle_deadline; + USHORT idle_wait; + UINT priority; + UINT maximum_runtime; + UINT exit_code; + HRESULT status; + UINT flags; + SYSTEMTIME last_runtime; +} FIXDLEN_DATA; + +typedef struct +{ ITask ITask_iface; IPersistFile IPersistFile_iface; LONG ref; @@ -731,17 +750,270 @@ static HRESULT WINAPI MSTASK_IPersistFile_Load( return E_NOTIMPL; } -static HRESULT WINAPI MSTASK_IPersistFile_Save( - IPersistFile* iface, - LPCOLESTR pszFileName, - BOOL fRemember) +static BOOL write_signature(HANDLE hfile) { - FIXME("(%p, %p, %d): stub\n", iface, pszFileName, fRemember); - WARN("Returning S_OK but not writing to disk: %s %d\n", - debugstr_w(pszFileName), fRemember); + struct + { + USHORT SignatureVersion; + USHORT ClientVersion; + BYTE md5[64]; + } signature; + DWORD size; + + signature.SignatureVersion = 0x0001; + signature.ClientVersion = 0x0001; + memset(&signature.md5, 0, sizeof(signature.md5)); + + return WriteFile(hfile, &signature, sizeof(signature), &size, NULL); +} + +static BOOL write_reserved_data(HANDLE hfile) +{ + static const struct + { + USHORT size; + BYTE data[8]; + } user = { 8, { 0xff,0x0f,0x1d,0,0,0,0,0 } }; + DWORD size; + + return WriteFile(hfile, &user, sizeof(user), &size, NULL); +} + +static BOOL write_user_data(HANDLE hfile, BYTE *data, WORD data_size) +{ + DWORD size; + + if (!WriteFile(hfile, &data_size, sizeof(data_size), &size, NULL)) + return FALSE; + + if (!data_size) return TRUE; + + return WriteFile(hfile, data, data_size, &size, NULL); +} + +static HRESULT write_triggers(ITask *task, HANDLE hfile) +{ + WORD count, i; + DWORD size; + HRESULT hr; + + hr = ITask_GetTriggerCount(task, &count); + if (hr != S_OK) return hr; + + if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) + return HRESULT_FROM_WIN32(GetLastError()); + + for (i = 0; i < count; i++) + { + ITaskTrigger *trigger; + TASK_TRIGGER task_trigger; + + hr = ITask_GetTrigger(task, i, &trigger); + if (hr != S_OK) return hr; + + hr = ITaskTrigger_GetTrigger(trigger, &task_trigger); + ITaskTrigger_Release(trigger); + if (hr != S_OK) return hr; + + if (!WriteFile(hfile, &task_trigger, sizeof(task_trigger), &size, NULL)) + return HRESULT_FROM_WIN32(GetLastError()); + } + return S_OK; } +static BOOL write_unicode_string(HANDLE hfile, const WCHAR *str) +{ + USHORT count; + DWORD size; + + count = str ? (lstrlenW(str) + 1) : 0; + if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) + return FALSE; + + if (!str) return TRUE; + + count *= sizeof(WCHAR); + return WriteFile(hfile, str, count, &size, NULL); +} + +static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR name, BOOL remember) +{ + static const WCHAR tasksW[] = { '\\','T','a','s','k','s','\\',0 }; + static const WCHAR jobW[] = { '.','j','o','b',0 }; + static WCHAR authorW[] = { 'W','i','n','e',0 }; + static WCHAR commentW[] = { 'C','r','e','a','t','e','d',' ','b','y',' ','W','i','n','e',0 }; + FIXDLEN_DATA fixed; + WORD word, user_data_size = 0; + HANDLE hfile; + DWORD size, ver, disposition; + TaskImpl *This = impl_from_IPersistFile(iface); + ITask *task = &This->ITask_iface; + LPWSTR appname = NULL, params = NULL, workdir = NULL, creator = NULL, comment = NULL; + BYTE *user_data = NULL; + WCHAR task_name[MAX_PATH]; + HRESULT hr; + + TRACE("(%p, %s, %d)\n", iface, debugstr_w(name), remember); + + disposition = name ? CREATE_NEW : OPEN_ALWAYS; + + if (!name) + { + name = This->task_name; + remember = FALSE; + } + else if (strchrW(name, '.')) + return E_INVALIDARG; + + GetWindowsDirectoryW(task_name, MAX_PATH); + lstrcatW(task_name, tasksW); + lstrcatW(task_name, name); + lstrcatW(task_name, jobW); + + ITask_GetComment(task, &comment); + if (!comment) comment = commentW; + ITask_GetCreator(task, &creator); + if (!creator) creator = authorW; + ITask_GetApplicationName(task, &appname); + ITask_GetParameters(task, ¶ms); + ITask_GetWorkingDirectory(task, &workdir); + ITask_GetWorkItemData(task, &user_data_size, &user_data); + + ver = GetVersion(); + fixed.product_version = MAKEWORD(ver >> 8, ver); + fixed.file_version = 0x0001; + CoCreateGuid(&fixed.uuid); + fixed.name_size_offset = sizeof(fixed) + sizeof(USHORT); /* FIXDLEN_DATA + Instance Count */ + fixed.trigger_offset = sizeof(fixed) + sizeof(USHORT); /* FIXDLEN_DATA + Instance Count */ + fixed.trigger_offset += sizeof(USHORT); /* Application Name */ + if (appname) + fixed.trigger_offset += (lstrlenW(appname) + 1) * sizeof(WCHAR); + fixed.trigger_offset += sizeof(USHORT); /* Parameters */ + if (params) + fixed.trigger_offset += (lstrlenW(params) + 1) * sizeof(WCHAR); + fixed.trigger_offset += sizeof(USHORT); /* Working Directory */ + if (workdir) + fixed.trigger_offset += (lstrlenW(workdir) + 1) * sizeof(WCHAR); + fixed.trigger_offset += sizeof(USHORT); /* Author */ + if (creator) + fixed.trigger_offset += (lstrlenW(creator) + 1) * sizeof(WCHAR); + fixed.trigger_offset += sizeof(USHORT); /* Comment */ + if (comment) + fixed.trigger_offset += (lstrlenW(comment) + 1) * sizeof(WCHAR); + fixed.trigger_offset += sizeof(USHORT) + user_data_size; /* User Data */ + fixed.trigger_offset += 10; /* Reserved Data */ + + fixed.error_retry_count = 0; + fixed.error_retry_interval = 0; + fixed.idle_wait = This->idle_minutes; + fixed.idle_deadline = This->deadline_minutes; + fixed.priority = This->priority; + fixed.maximum_runtime = This->maxRunTime; + fixed.exit_code = 0; + fixed.status = SCHED_S_TASK_HAS_NOT_RUN; + fixed.flags = 0; + memset(&fixed.last_runtime, 0, sizeof(fixed.last_runtime)); + + hfile = CreateFileW(task_name, GENERIC_WRITE, 0, NULL, disposition, 0, 0); + if (hfile == INVALID_HANDLE_VALUE) + return HRESULT_FROM_WIN32(GetLastError()); + + if (!WriteFile(hfile, &fixed, sizeof(fixed), &size, NULL)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + /* Instance Count */ + word = 0; + if (!WriteFile(hfile, &word, sizeof(word), &size, NULL)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + /* Application Name */ + if (!write_unicode_string(hfile, appname)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + /* Parameters */ + if (!write_unicode_string(hfile, params)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + /* Working Directory */ + if (!write_unicode_string(hfile, workdir)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + /* Author */ + if (!write_unicode_string(hfile, creator)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + /* Comment */ + if (!write_unicode_string(hfile, comment)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + /* User Data */ + if (!write_user_data(hfile, user_data, user_data_size)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + /* Reserved Data */ + if (!write_reserved_data(hfile)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + /* Trigegrs */ + if (!write_triggers(hfile, task)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + /* Signature */ + if (!write_signature(hfile)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + hr = S_OK; + +failed: + CoTaskMemFree(appname); + CoTaskMemFree(params); + CoTaskMemFree(workdir); + if (creator != authorW) + CoTaskMemFree(creator); + if (comment != commentW) + CoTaskMemFree(comment); + CoTaskMemFree(user_data); + + CloseHandle(hfile); + if (hr != S_OK) + DeleteFileW(name); + else if (remember) + { + HeapFree(GetProcessHeap(), 0, This->task_name); + This->task_name = heap_strdupW(name); + } + return hr; +} + static HRESULT WINAPI MSTASK_IPersistFile_SaveCompleted( IPersistFile* iface, LPCOLESTR pszFileName) @@ -758,7 +1030,6 @@ static HRESULT WINAPI MSTASK_IPersistFile_GetCurFile( return E_NOTIMPL; } - static const ITaskVtbl MSTASK_ITaskVtbl = { MSTASK_ITask_QueryInterface,
1
0
0
0
Dmitry Timoshkov : mstask: Implement better stub for ITask:: GetMostRecentRunTime().
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: be8a21f136d236452727e191788d34920c796125 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=be8a21f136d236452727e191…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 20 16:37:27 2018 +0800 mstask: Implement better stub for ITask::GetMostRecentRunTime(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 10 +++++----- dlls/mstask/tests/task.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index ed0ef65..19bd919 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -225,12 +225,12 @@ static HRESULT WINAPI MSTASK_ITask_EditWorkItem( return E_NOTIMPL; } -static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime( - ITask* iface, - SYSTEMTIME *pstLastRun) +static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime(ITask *iface, SYSTEMTIME *st) { - FIXME("(%p, %p): stub\n", iface, pstLastRun); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, st); + + memset(st, 0, sizeof(*st)); + return SCHED_S_TASK_HAS_NOT_RUN; } static HRESULT WINAPI MSTASK_ITask_GetStatus(ITask *iface, HRESULT *status) diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 6184604..6e3c997 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -503,6 +503,7 @@ static void test_task_state(void) HRESULT hr, status; DWORD flags, val; WORD val1, val2; + SYSTEMTIME st; setup = setup_task(); ok(setup, "Failed to setup test_task\n"); @@ -573,6 +574,19 @@ static void test_task_state(void) ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); ok(val == 0, "got %#x\n", val); + if (0) /* crashes under Windows */ + hr = ITask_GetMostRecentRunTime(test_task, NULL); + + memset(&st, 0xff, sizeof(st)); + hr = ITask_GetMostRecentRunTime(test_task, &st); + ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); + ok(st.wYear == 0, "got %u\n", st.wYear); + ok(st.wMonth == 0, "got %u\n", st.wMonth); + ok(st.wDay == 0, "got %u\n", st.wDay); + ok(st.wHour == 0, "got %u\n", st.wHour); + ok(st.wMinute == 0, "got %u\n", st.wMinute); + ok(st.wSecond == 0, "got %u\n", st.wSecond); + cleanup_task(); }
1
0
0
0
Dmitry Timoshkov : mstask: Implement better stub for ITask::GetExitCode().
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: 23be14b1afda8ee4bd2821d0776e7d75b272a5de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23be14b1afda8ee4bd2821d0…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 20 16:37:24 2018 +0800 mstask: Implement better stub for ITask::GetExitCode(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 10 +++++----- dlls/mstask/tests/task.c | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 27f4766..ed0ef65 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -243,12 +243,12 @@ static HRESULT WINAPI MSTASK_ITask_GetStatus(ITask *iface, HRESULT *status) return S_OK; } -static HRESULT WINAPI MSTASK_ITask_GetExitCode( - ITask* iface, - DWORD *pdwExitCode) +static HRESULT WINAPI MSTASK_ITask_GetExitCode(ITask *iface, DWORD *exit_code) { - FIXME("(%p, %p): stub\n", iface, pdwExitCode); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, exit_code); + + *exit_code = 0; + return SCHED_S_TASK_HAS_NOT_RUN; } static HRESULT WINAPI MSTASK_ITask_SetComment(ITask *iface, LPCWSTR comment) diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 5952b53..6184604 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -565,6 +565,14 @@ static void test_task_state(void) ok(hr == S_OK, "got %#x\n", hr); ok(val == NORMAL_PRIORITY_CLASS, "got %#x\n", val); + if (0) /* crashes under Windows */ + hr = ITask_GetExitCode(test_task, NULL); + + val = 0xdeadbeef; + hr = ITask_GetExitCode(test_task, &val); + ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); + ok(val == 0, "got %#x\n", val); + cleanup_task(); }
1
0
0
0
Dmitry Timoshkov : mstask: Implement ITask::GetPriority().
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: 2e04dd1c4aa5157ab9435c8ca677b57fe4e3b192 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2e04dd1c4aa5157ab9435c8c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 20 16:37:21 2018 +0800 mstask: Implement ITask::GetPriority(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 15 +++++++++------ dlls/mstask/tests/task.c | 10 +++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index c2cd14e..27f4766 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -41,7 +41,7 @@ typedef struct LPWSTR task_name; HRESULT status; WORD idle_minutes, deadline_minutes; - DWORD maxRunTime; + DWORD priority, maxRunTime; LPWSTR accountName; } TaskImpl; @@ -626,12 +626,14 @@ static HRESULT WINAPI MSTASK_ITask_SetPriority( return E_NOTIMPL; } -static HRESULT WINAPI MSTASK_ITask_GetPriority( - ITask* iface, - DWORD *pdwPriority) +static HRESULT WINAPI MSTASK_ITask_GetPriority(ITask *iface, DWORD *priority) { - FIXME("(%p, %p): stub\n", iface, pdwPriority); - return E_NOTIMPL; + TaskImpl *This = impl_from_ITask(iface); + + TRACE("(%p, %p)\n", iface, priority); + + *priority = This->priority; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_SetTaskFlags( @@ -845,6 +847,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *task_name, ITask **t This->status = SCHED_S_TASK_NOT_SCHEDULED; This->idle_minutes = 10; This->deadline_minutes = 60; + This->priority = NORMAL_PRIORITY_CLASS; This->accountName = NULL; /* Default time is 3 days = 259200000 ms */ diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 55e4913..5952b53 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -501,7 +501,7 @@ static void test_task_state(void) { BOOL setup; HRESULT hr, status; - DWORD flags; + DWORD flags, val; WORD val1, val2; setup = setup_task(); @@ -557,6 +557,14 @@ static void test_task_state(void) ok(val1 == 10, "got %u\n", val1); ok(val2 == 60, "got %u\n", val2); + if (0) /* crashes under Windows */ + hr = ITask_GetPriority(test_task, NULL); + + val = 0xdeadbeef; + hr = ITask_GetPriority(test_task, &val); + ok(hr == S_OK, "got %#x\n", hr); + ok(val == NORMAL_PRIORITY_CLASS, "got %#x\n", val); + cleanup_task(); }
1
0
0
0
Dmitry Timoshkov : mstask: Implement ITask::GetIdleWait().
by Alexandre Julliard
20 Apr '18
20 Apr '18
Module: wine Branch: master Commit: d08a101a283cf00f24bcc3ae99211cd90d3e597b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d08a101a283cf00f24bcc3ae…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 20 16:37:18 2018 +0800 mstask: Implement ITask::GetIdleWait(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 17 +++++++++++------ dlls/mstask/tests/task.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 3f68afb..c2cd14e 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -40,6 +40,7 @@ typedef struct IExecAction *action; LPWSTR task_name; HRESULT status; + WORD idle_minutes, deadline_minutes; DWORD maxRunTime; LPWSTR accountName; } TaskImpl; @@ -190,13 +191,15 @@ static HRESULT WINAPI MSTASK_ITask_SetIdleWait( return E_NOTIMPL; } -static HRESULT WINAPI MSTASK_ITask_GetIdleWait( - ITask* iface, - WORD *pwIdleMinutes, - WORD *pwDeadlineMinutes) +static HRESULT WINAPI MSTASK_ITask_GetIdleWait(ITask *iface, WORD *idle_minutes, WORD *deadline_minutes) { - FIXME("(%p, %p, %p): stub\n", iface, pwIdleMinutes, pwDeadlineMinutes); - return E_NOTIMPL; + TaskImpl *This = impl_from_ITask(iface); + + TRACE("(%p, %p, %p): stub\n", iface, idle_minutes, deadline_minutes); + + *idle_minutes = This->idle_minutes; + *deadline_minutes = This->deadline_minutes; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_Run( @@ -840,6 +843,8 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *task_name, ITask **t This->task = taskdef; This->task_name = heap_strdupW(task_name); This->status = SCHED_S_TASK_NOT_SCHEDULED; + This->idle_minutes = 10; + This->deadline_minutes = 60; This->accountName = NULL; /* Default time is 3 days = 259200000 ms */ diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 5256424..55e4913 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -502,7 +502,7 @@ static void test_task_state(void) BOOL setup; HRESULT hr, status; DWORD flags; - WORD val1; + WORD val1, val2; setup = setup_task(); ok(setup, "Failed to setup test_task\n"); @@ -547,6 +547,16 @@ static void test_task_state(void) hr = ITask_GetErrorRetryInterval(test_task, &val1); ok(hr == E_NOTIMPL, "got %#x\n", hr); + if (0) /* crashes under Windows */ + hr = ITask_GetIdleWait(test_task, NULL, NULL); + + val1 = 0xdead; + val2 = 0xbeef; + hr = ITask_GetIdleWait(test_task, &val1, &val2); + ok(hr == S_OK, "got %#x\n", hr); + ok(val1 == 10, "got %u\n", val1); + ok(val2 == 60, "got %u\n", val2); + cleanup_task(); }
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
55
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
Results per page:
10
25
50
100
200