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
November 2017
----- 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
436 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Store listener container type as a string.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 26f731f4a03519456ddc157fe6200be4c0ee323a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26f731f4a03519456ddc157fe…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Nov 30 16:10:50 2017 +0100 mshtml: Store listener container type as a string. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 3b8820e..860c361 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -50,8 +50,8 @@ typedef struct { typedef struct { struct wine_rb_entry entry; - eventid_t event_id; struct list listeners; + WCHAR type[1]; } listener_container_t; static const WCHAR abortW[] = {'a','b','o','r','t',0}; @@ -242,8 +242,9 @@ static listener_container_t *get_listener_container(EventTarget *event_target, e const event_target_vtbl_t *vtbl; listener_container_t *container; struct wine_rb_entry *entry; + size_t type_len; - entry = wine_rb_get(&event_target->handler_map, (const void*)eid); + entry = wine_rb_get(&event_target->handler_map, event_info[eid].name); if(entry) return WINE_RB_ENTRY_VALUE(entry, listener_container_t, entry); if(!alloc) @@ -252,11 +253,11 @@ static listener_container_t *get_listener_container(EventTarget *event_target, e if(event_info[eid].flags & EVENT_FIXME) FIXME("unimplemented event %s\n", debugstr_w(event_info[eid].name)); - container = heap_alloc(sizeof(*container)); + type_len = strlenW(event_info[eid].name); + container = heap_alloc(FIELD_OFFSET(listener_container_t, type[type_len+1])); if(!container) return NULL; - - container->event_id = eid; + memcpy(container->type, event_info[eid].name, (type_len + 1) * sizeof(WCHAR)); list_init(&container->listeners); vtbl = dispex_get_vtbl(&event_target->dispex); if(vtbl->bind_event) @@ -264,7 +265,7 @@ static listener_container_t *get_listener_container(EventTarget *event_target, e else FIXME("Unsupported event binding on target %p\n", event_target); - wine_rb_put(&event_target->handler_map, (const void*)eid, &container->entry); + wine_rb_put(&event_target->handler_map, container->type, &container->entry); return container; } @@ -2264,7 +2265,7 @@ void EventTarget_init_dispex_info(dispex_data_t *dispex_info, compat_mode_t comp static int event_id_cmp(const void *key, const struct wine_rb_entry *entry) { - return (INT_PTR)key - WINE_RB_ENTRY_VALUE(entry, listener_container_t, entry)->event_id; + return strcmpW(key, WINE_RB_ENTRY_VALUE(entry, listener_container_t, entry)->type); } void EventTarget_Init(EventTarget *event_target, IUnknown *outer, dispex_static_data_t *dispex_data,
1
0
0
0
Jacek Caban : mshtml: Removed unused impl_from_DispatchEx.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: dda20ef4ec9d0db3354789b525a079db44cb17bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dda20ef4ec9d0db3354789b52…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Nov 30 16:09:37 2017 +0100 mshtml: Removed unused impl_from_DispatchEx. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 0b9a36b..3b8820e 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -2051,11 +2051,6 @@ static inline EventTarget *impl_from_IEventTarget(IEventTarget *iface) return CONTAINING_RECORD(iface, EventTarget, IEventTarget_iface); } -static inline EventTarget *impl_from_DispatchEx(DispatchEx *iface) -{ - return CONTAINING_RECORD(iface, EventTarget, dispex); -} - static HRESULT WINAPI EventTarget_QueryInterface(IEventTarget *iface, REFIID riid, void **ppv) { EventTarget *This = impl_from_IEventTarget(iface);
1
0
0
0
Andrew Eikum : xaudio2: Ignore buffers returned from OpenAL after Stop.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: e2c73fc394bace00c4463b6fcb6dfe9dc64084bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e2c73fc394bace00c4463b6fc…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Nov 30 08:01:53 2017 -0600 xaudio2: Ignore buffers returned from OpenAL after Stop. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xaudio2_7/tests/xaudio2.c | 78 ++++++++++++++++++++++++++++++++++++++++ dlls/xaudio2_7/xaudio_dll.c | 79 +++++++++++++++++++++++++---------------- dlls/xaudio2_7/xaudio_private.h | 2 +- 3 files changed, 128 insertions(+), 31 deletions(-) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 54176ea..ff402f8 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -841,6 +841,82 @@ static void test_submix(IXAudio2 *xa) IXAudio2MasteringVoice_DestroyVoice(master); } +static void test_flush(IXAudio2 *xa) +{ + HRESULT hr; + IXAudio2MasteringVoice *master; + IXAudio2SourceVoice *src; + WAVEFORMATEX fmt; + XAUDIO2_BUFFER buf; + XAUDIO2_VOICE_STATE state; + + XA2CALL_0V(StopEngine); + + if(xaudio27) + hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); + else + hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); + ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); + + fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; + fmt.nChannels = 2; + fmt.nSamplesPerSec = 44100; + fmt.wBitsPerSample = 32; + fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; + fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; + fmt.cbSize = 0; + + XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL); + ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); + + memset(&buf, 0, sizeof(buf)); + buf.AudioBytes = 22050 * fmt.nBlockAlign; + buf.pAudioData = HeapAlloc(GetProcessHeap(), 0, buf.AudioBytes); + fill_buf((float*)buf.pAudioData, &fmt, 440, 22050); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + XA2CALL_0(StartEngine); + ok(hr == S_OK, "StartEngine failed: %08x\n", hr); + + while(1){ + if(xaudio27) + IXAudio27SourceVoice_GetState((IXAudio27SourceVoice*)src, &state); + else + IXAudio2SourceVoice_GetState(src, &state, 0); + if(state.SamplesPlayed >= 2205) + break; + Sleep(10); + } + + hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Stop failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_FlushSourceBuffers(src); + ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr); + + hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); + ok(hr == S_OK, "Start failed: %08x\n", hr); + + Sleep(100); + + hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); + ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); + + if(xaudio27){ + IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src); + }else{ + IXAudio2SourceVoice_DestroyVoice(src); + } + IXAudio2MasteringVoice_DestroyVoice(master); + + HeapFree(GetProcessHeap(), 0, (void*)buf.pAudioData); +} + static UINT32 test_DeviceDetails(IXAudio27 *xa) { HRESULT hr; @@ -1136,6 +1212,7 @@ START_TEST(xaudio2) test_buffer_callbacks((IXAudio2*)xa27); test_looping((IXAudio2*)xa27); test_submix((IXAudio2*)xa27); + test_flush((IXAudio2*)xa27); }else skip("No audio devices available\n"); @@ -1159,6 +1236,7 @@ START_TEST(xaudio2) test_buffer_callbacks(xa); test_looping(xa); test_submix(xa); + test_flush(xa); }else skip("No audio devices available\n"); diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 13f5916..8f15ded 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -414,6 +414,7 @@ static void WINAPI XA2SRC_DestroyVoice(IXAudio2SourceVoice *iface) This->nbufs = 0; This->first_buf = 0; This->cur_buf = 0; + This->abandoned_albufs = 0; LeaveCriticalSection(&This->lock); } @@ -438,11 +439,18 @@ static HRESULT WINAPI XA2SRC_Stop(IXAudio2SourceVoice *iface, UINT32 Flags, UINT32 OperationSet) { XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface); + ALint bufs; TRACE("%p, 0x%x, 0x%x\n", This, Flags, OperationSet); + palcSetThreadContext(This->xa2->al_ctx); + EnterCriticalSection(&This->lock); + alGetSourcei(This->al_src, AL_BUFFERS_QUEUED, &bufs); + + This->abandoned_albufs = bufs; + This->running = FALSE; LeaveCriticalSection(&This->lock); @@ -2273,44 +2281,53 @@ static void update_source_state(XA2SourceImpl *src) ALuint al_buffers[XAUDIO2_MAX_QUEUED_BUFFERS]; alSourceUnqueueBuffers(src->al_src, processed, al_buffers); + src->first_al_buf += processed; src->first_al_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; src->al_bufs_used -= processed; - for(i = 0; i < processed; ++i){ - ALint bufsize; - - alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); + if(processed > src->abandoned_albufs){ + for(i = src->abandoned_albufs; i < processed; ++i){ + ALint bufsize; - src->in_al_bytes -= bufsize; - src->played_frames += bufsize / src->submit_blocksize; + alGetBufferi(al_buffers[i], AL_SIZE, &bufsize); - if(al_buffers[i] == src->buffers[src->first_buf].latest_al_buf){ - DWORD old_buf = src->first_buf; + src->in_al_bytes -= bufsize; + src->played_frames += bufsize / src->submit_blocksize; - src->first_buf++; - src->first_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; - src->nbufs--; + if(al_buffers[i] == src->buffers[src->first_buf].latest_al_buf){ + DWORD old_buf = src->first_buf; - TRACE("%p: done with buffer %u\n", src, old_buf); + src->first_buf++; + src->first_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; + src->nbufs--; - if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) - src->played_frames = 0; + TRACE("%p: done with buffer %u\n", src, old_buf); - if(src->cb){ - IXAudio2VoiceCallback_OnBufferEnd(src->cb, - src->buffers[old_buf].xa2buffer.pContext); if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) - IXAudio2VoiceCallback_OnStreamEnd(src->cb); - - if(src->nbufs > 0) - IXAudio2VoiceCallback_OnBufferStart(src->cb, - src->buffers[src->first_buf].xa2buffer.pContext); + src->played_frames = 0; + + if(src->cb){ + IXAudio2VoiceCallback_OnBufferEnd(src->cb, + src->buffers[old_buf].xa2buffer.pContext); + if(src->buffers[old_buf].xa2buffer.Flags & XAUDIO2_END_OF_STREAM) + IXAudio2VoiceCallback_OnStreamEnd(src->cb); + + if(src->nbufs > 0) + IXAudio2VoiceCallback_OnBufferStart(src->cb, + src->buffers[src->first_buf].xa2buffer.pContext); + } } } - } + + src->abandoned_albufs = 0; + }else + src->abandoned_albufs -= processed; } + if(!src->running) + return; + alGetSourcei(src->al_src, AL_BYTE_OFFSET, &bufpos); /* maintain IN_AL_PERIODS periods in AL */ @@ -2384,12 +2401,12 @@ static void do_engine_tick(IXAudio2Impl *This) EnterCriticalSection(&src->lock); - if(!src->in_use || !src->running){ + if(!src->in_use){ LeaveCriticalSection(&src->lock); continue; } - if(src->cb){ + if(src->cb && This->running){ #if XAUDIO2_VER == 0 IXAudio20VoiceCallback_OnVoiceProcessingPassStart((IXAudio20VoiceCallback*)src->cb); #else @@ -2403,12 +2420,14 @@ static void do_engine_tick(IXAudio2Impl *This) update_source_state(src); - alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); - if(st != AL_PLAYING) - alSourcePlay(src->al_src); + if(This->running){ + alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); + if(st != AL_PLAYING) + alSourcePlay(src->al_src); - if(src->cb) - IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); + if(src->cb) + IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); + } LeaveCriticalSection(&src->lock); } diff --git a/dlls/xaudio2_7/xaudio_private.h b/dlls/xaudio2_7/xaudio_private.h index f28a0ae..1a4aa08 100644 --- a/dlls/xaudio2_7/xaudio_private.h +++ b/dlls/xaudio2_7/xaudio_private.h @@ -81,7 +81,7 @@ typedef struct _XA2SourceImpl { /* most cases will only need about 4 AL buffers, but some corner cases * could require up to MAX_QUEUED_BUFFERS */ ALuint al_bufs[XAUDIO2_MAX_QUEUED_BUFFERS]; - DWORD first_al_buf, al_bufs_used; + DWORD first_al_buf, al_bufs_used, abandoned_albufs; struct list entry; } XA2SourceImpl;
1
0
0
0
Alexandre Julliard : kernel32/tests: Add a test for the thread initial context.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: b802f88319969fc5c71807ec8b695b0256bdf35c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b802f88319969fc5c71807ec8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 30 12:25:58 2017 +0100 kernel32/tests: Add a test for the thread initial context. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/process.c | 44 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 6790185..07067ab 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -3036,6 +3036,7 @@ static void test_SuspendProcessNewThread(void) IMAGE_NT_HEADERS nt_header; HANDLE thread_handle = NULL; DWORD exit_code = 0; + CONTEXT ctx; exit_thread_ptr = GetProcAddress(hkernel32, "ExitThread"); ok(exit_thread_ptr != NULL, "GetProcAddress ExitThread failed\n"); @@ -3052,9 +3053,50 @@ static void test_SuspendProcessNewThread(void) thread_handle = CreateRemoteThread(pi.hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)exit_thread_ptr, - (PVOID)(ULONG_PTR)0x1234, 0, NULL); + (PVOID)(ULONG_PTR)0x1234, CREATE_SUSPENDED, NULL); ok(thread_handle != NULL, "Could not create remote thread (%d)\n", GetLastError()); + ret = are_imports_resolved(pi.hProcess, exe_base, &nt_header); + ok(!ret, "IAT entry resolved prematurely\n"); + + ctx.ContextFlags = CONTEXT_FULL; + ret = GetThreadContext( thread_handle, &ctx ); + ok( ret, "Failed retrieving remote thread context (%d)\n", GetLastError() ); +#ifdef __x86_64__ + ok( ctx.ContextFlags == CONTEXT_FULL, "wrong flags %x\n", ctx.ContextFlags ); + ok( !ctx.Rax, "rax is not zero %lx\n", ctx.Rax ); + ok( !ctx.Rbx, "rbx is not zero %lx\n", ctx.Rbx ); + ok( ctx.Rcx == (ULONG_PTR)exit_thread_ptr, "wrong rcx %lx/%p\n", ctx.Rcx, exit_thread_ptr ); + ok( ctx.Rdx == 0x1234, "wrong rdx %lx\n", ctx.Rdx ); + ok( !ctx.Rsi, "rsi is not zero %lx\n", ctx.Rsi ); + ok( !ctx.Rdi, "rdi is not zero %lx\n", ctx.Rdi ); + ok( !ctx.Rbp, "rbp is not zero %lx\n", ctx.Rbp ); + ok( !ctx.R8, "r8 is not zero %lx\n", ctx.R8 ); + ok( !ctx.R9, "r9 is not zero %lx\n", ctx.R9 ); + ok( !ctx.R10, "r10 is not zero %lx\n", ctx.R10 ); + ok( !ctx.R11, "r11 is not zero %lx\n", ctx.R11 ); + ok( !ctx.R12, "r12 is not zero %lx\n", ctx.R12 ); + ok( !ctx.R13, "r13 is not zero %lx\n", ctx.R13 ); + ok( !ctx.R14, "r14 is not zero %lx\n", ctx.R14 ); + ok( !ctx.R15, "r15 is not zero %lx\n", ctx.R15 ); + ok( !((ctx.Rsp + 0x28) & 0xfff), "rsp is not at top of stack page %lx\n", ctx.Rsp ); +#else + ok( ctx.ContextFlags == CONTEXT_FULL, "wrong flags %x\n", ctx.ContextFlags ); + ok( !ctx.Ebp || broken(ctx.Ebp), /* winxp */ "ebp is not zero %08x\n", ctx.Ebp ); + if (!ctx.Ebp) /* winxp is completely different */ + { + ok( !ctx.Ecx, "ecx is not zero %08x\n", ctx.Ecx ); + ok( !ctx.Edx, "edx is not zero %08x\n", ctx.Edx ); + ok( !ctx.Esi, "esi is not zero %08x\n", ctx.Esi ); + ok( !ctx.Edi, "edi is not zero %08x\n", ctx.Edi ); + } + ok( ctx.Eax == (ULONG_PTR)exit_thread_ptr, "wrong eax %08x/%p\n", ctx.Eax, exit_thread_ptr ); + ok( ctx.Ebx == 0x1234, "wrong ebx %08x\n", ctx.Ebx ); + ok( !((ctx.Esp + 0x10) & 0xfff) || broken( !((ctx.Esp + 4) & 0xfff) ), /* winxp, w2k3 */ + "esp is not at top of stack page or properly aligned: %08x\n", ctx.Esp ); +#endif + + ResumeThread( thread_handle ); ok(WaitForSingleObject(thread_handle, 60000) == WAIT_OBJECT_0, "Waiting for remote thread failed (%d)\n", GetLastError()); ok(GetExitCodeThread(thread_handle, &exit_code), "Failed to retrieve remote thread exit code (%d)\n", GetLastError()); ok(exit_code == 0x1234, "Invalid remote thread exit code\n");
1
0
0
0
Alexandre Julliard : ntdll: Don't return from attach_dlls on failure.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 70b69f3e5fb964e08a77de936dbf5bb49f4afabf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70b69f3e5fb964e08a77de936…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 30 16:00:14 2017 +0100 ntdll: Don't return from attach_dlls on failure. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 39 +++++++++++++++++++++++++-------------- dlls/ntdll/ntdll_misc.h | 6 +++--- dlls/ntdll/server.c | 6 +++--- dlls/ntdll/signal_arm.c | 20 +++++++------------- dlls/ntdll/signal_arm64.c | 20 +++++++------------- dlls/ntdll/signal_i386.c | 25 ++++++++----------------- dlls/ntdll/signal_powerpc.c | 20 +++++++------------- dlls/ntdll/signal_x86_64.c | 25 ++++++++----------------- dlls/ntdll/thread.c | 4 +--- 9 files changed, 69 insertions(+), 96 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=70b69f3e5fb964e08a77d…
1
0
0
0
Alexandre Julliard : ntdll: Suspend a thread with its start context explicitly before attaching dlls.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 6c61ea6a13eae35429f48b07d32fc5a67e3b5833 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c61ea6a13eae35429f48b07d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 30 11:01:47 2017 +0100 ntdll: Suspend a thread with its start context explicitly before attaching dlls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll_misc.h | 4 ++-- dlls/ntdll/server.c | 3 ++- dlls/ntdll/signal_arm.c | 12 +++++++++++- dlls/ntdll/signal_arm64.c | 12 +++++++++++- dlls/ntdll/signal_i386.c | 20 +++++++++++++++++++- dlls/ntdll/signal_powerpc.c | 12 +++++++++++- dlls/ntdll/signal_x86_64.c | 15 ++++++++++++++- dlls/ntdll/thread.c | 8 +++++--- include/wine/server_protocol.h | 4 ++-- server/protocol.def | 1 + server/request.h | 1 + server/thread.c | 2 +- server/trace.c | 1 + 13 files changed, 81 insertions(+), 14 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6c61ea6a13eae35429f48…
1
0
0
0
Hans Leidekker : taskschd: Implement IExecAction_get_Path.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 0d3ebfc45981e7d61522c44ff91f9b8748ca5c60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d3ebfc45981e7d61522c44ff…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 30 09:37:11 2017 +0100 taskschd: Implement IExecAction_get_Path. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/taskschd/task.c | 16 ++++++++++++++-- dlls/taskschd/tests/scheduler.c | 13 +++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 01e7c2d..df75236 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -1740,8 +1740,20 @@ static HRESULT WINAPI ExecAction_get_Type(IExecAction *iface, TASK_ACTION_TYPE * static HRESULT WINAPI ExecAction_get_Path(IExecAction *iface, BSTR *path) { - FIXME("%p,%p: stub\n", iface, path); - return E_NOTIMPL; + ExecAction *action = impl_from_IExecAction(iface); + + TRACE("%p,%p\n", iface, path); + + if (!path) return E_POINTER; + + if (!action->path) + { + *path = NULL; + return S_OK; + } + + if (!(*path = SysAllocString(action->path))) return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI ExecAction_put_Path(IExecAction *iface, BSTR path) diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 22854d9..c7de7c7 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1236,6 +1236,7 @@ static void create_action(ITaskDefinition *taskdef) IAction *action; IExecAction *exec_action; TASK_ACTION_TYPE type; + BSTR path; hr = ITaskDefinition_get_Actions(taskdef, &actions); ok(hr == S_OK, "get_Actions error %#x\n", hr); @@ -1251,9 +1252,21 @@ static void create_action(ITaskDefinition *taskdef) ok(hr == S_OK, "get_Type error %#x\n", hr); ok(type == TASK_ACTION_EXEC, "got %u\n", type ); + path = (BSTR)0xdeadbeef; + hr = IExecAction_get_Path(exec_action, &path); + ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(path == NULL, "path not set\n"); + hr = IExecAction_put_Path(exec_action, task1_exe); ok(hr == S_OK, "put_Path error %#x\n", hr); + path = NULL; + hr = IExecAction_get_Path(exec_action, &path); + ok(hr == S_OK, "get_Path error %#x\n", hr); + ok(path != NULL, "path not set\n"); + ok(!lstrcmpW(path, task1_exe), "wrong path\n" ); + SysFreeString(path); + IExecAction_Release(exec_action); IAction_Release(action); IActionCollection_Release(actions);
1
0
0
0
Hans Leidekker : taskschd: Implement IExecAction_put_Path.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: e0fbe82e66834afb2a57f6bdeec955616fd84aac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e0fbe82e66834afb2a57f6bde…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 30 09:37:10 2017 +0100 taskschd: Implement IExecAction_put_Path. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/taskschd/task.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index f32d3d2..01e7c2d 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -1638,6 +1638,7 @@ typedef struct { IExecAction IExecAction_iface; LONG ref; + WCHAR *path; } ExecAction; static inline ExecAction *impl_from_IExecAction(IExecAction *iface) @@ -1659,6 +1660,7 @@ static ULONG WINAPI ExecAction_Release(IExecAction *iface) if (!ref) { TRACE("destroying %p\n", iface); + heap_free(action->path); heap_free(action); } @@ -1744,7 +1746,15 @@ static HRESULT WINAPI ExecAction_get_Path(IExecAction *iface, BSTR *path) static HRESULT WINAPI ExecAction_put_Path(IExecAction *iface, BSTR path) { - FIXME("%p,%s: stub\n", iface, debugstr_w(path)); + ExecAction *action = impl_from_IExecAction(iface); + WCHAR *str = NULL; + + TRACE("%p,%s\n", iface, debugstr_w(path)); + + if (path && !(str = heap_strdupW((path)))) return E_OUTOFMEMORY; + heap_free(action->path); + action->path = str; + return S_OK; } @@ -1801,6 +1811,7 @@ static HRESULT ExecAction_create(IExecAction **obj) action->IExecAction_iface.lpVtbl = &Action_vtbl; action->ref = 1; + action->path = NULL; *obj = &action->IExecAction_iface;
1
0
0
0
Hans Leidekker : taskschd: Implement IActionCollection_Create.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 8d739937d336f78cd34e8aa8a873f89a43ca274c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d739937d336f78cd34e8aa8a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 30 09:37:09 2017 +0100 taskschd: Implement IActionCollection_Create. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/taskschd/task.c | 188 +++++++++++++++++++++++++++++++++++++++- dlls/taskschd/tests/scheduler.c | 13 ++- 2 files changed, 192 insertions(+), 9 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 1c20f83..f32d3d2 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -1636,6 +1636,181 @@ static HRESULT Principal_create(IPrincipal **obj) typedef struct { + IExecAction IExecAction_iface; + LONG ref; +} ExecAction; + +static inline ExecAction *impl_from_IExecAction(IExecAction *iface) +{ + return CONTAINING_RECORD(iface, ExecAction, IExecAction_iface); +} + +static ULONG WINAPI ExecAction_AddRef(IExecAction *iface) +{ + ExecAction *action = impl_from_IExecAction(iface); + return InterlockedIncrement(&action->ref); +} + +static ULONG WINAPI ExecAction_Release(IExecAction *iface) +{ + ExecAction *action = impl_from_IExecAction(iface); + LONG ref = InterlockedDecrement(&action->ref); + + if (!ref) + { + TRACE("destroying %p\n", iface); + heap_free(action); + } + + return ref; +} + +static HRESULT WINAPI ExecAction_QueryInterface(IExecAction *iface, REFIID riid, void **obj) +{ + if (!riid || !obj) return E_INVALIDARG; + + TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj); + + if (IsEqualGUID(riid, &IID_IExecAction) || + IsEqualGUID(riid, &IID_IAction) || + IsEqualGUID(riid, &IID_IDispatch) || + IsEqualGUID(riid, &IID_IUnknown)) + { + IExecAction_AddRef(iface); + *obj = iface; + return S_OK; + } + + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; +} + +static HRESULT WINAPI ExecAction_GetTypeInfoCount(IExecAction *iface, UINT *count) +{ + FIXME("%p,%p: stub\n", iface, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_GetTypeInfo(IExecAction *iface, UINT index, LCID lcid, ITypeInfo **info) +{ + FIXME("%p,%u,%u,%p: stub\n", iface, index, lcid, info); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_GetIDsOfNames(IExecAction *iface, REFIID riid, LPOLESTR *names, + UINT count, LCID lcid, DISPID *dispid) +{ + FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_Invoke(IExecAction *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, + DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr) +{ + FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags, + params, result, excepinfo, argerr); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_get_Id(IExecAction *iface, BSTR *id) +{ + FIXME("%p,%p: stub\n", iface, id); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_put_Id(IExecAction *iface, BSTR id) +{ + FIXME("%p,%s: stub\n", iface, debugstr_w(id)); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_get_Type(IExecAction *iface, TASK_ACTION_TYPE *type) +{ + TRACE("%p,%p\n", iface, type); + + if (!type) return E_POINTER; + + *type = TASK_ACTION_EXEC; + + return S_OK; +} + +static HRESULT WINAPI ExecAction_get_Path(IExecAction *iface, BSTR *path) +{ + FIXME("%p,%p: stub\n", iface, path); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_put_Path(IExecAction *iface, BSTR path) +{ + FIXME("%p,%s: stub\n", iface, debugstr_w(path)); + return S_OK; +} + +static HRESULT WINAPI ExecAction_get_Arguments(IExecAction *iface, BSTR *arguments) +{ + FIXME("%p,%p: stub\n", iface, arguments); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_put_Arguments(IExecAction *iface, BSTR arguments) +{ + FIXME("%p,%s: stub\n", iface, debugstr_w(arguments)); + return S_OK; +} + +static HRESULT WINAPI ExecAction_get_WorkingDirectory(IExecAction *iface, BSTR *directory) +{ + FIXME("%p,%p: stub\n", iface, directory); + return E_NOTIMPL; +} + +static HRESULT WINAPI ExecAction_put_WorkingDirectory(IExecAction *iface, BSTR directory) +{ + FIXME("%p,%s: stub\n", iface, debugstr_w(directory)); + return E_NOTIMPL; +} + +static const IExecActionVtbl Action_vtbl = +{ + ExecAction_QueryInterface, + ExecAction_AddRef, + ExecAction_Release, + ExecAction_GetTypeInfoCount, + ExecAction_GetTypeInfo, + ExecAction_GetIDsOfNames, + ExecAction_Invoke, + ExecAction_get_Id, + ExecAction_put_Id, + ExecAction_get_Type, + ExecAction_get_Path, + ExecAction_put_Path, + ExecAction_get_Arguments, + ExecAction_put_Arguments, + ExecAction_get_WorkingDirectory, + ExecAction_put_WorkingDirectory +}; + +static HRESULT ExecAction_create(IExecAction **obj) +{ + ExecAction *action; + + action = heap_alloc(sizeof(*action)); + if (!action) return E_OUTOFMEMORY; + + action->IExecAction_iface.lpVtbl = &Action_vtbl; + action->ref = 1; + + *obj = &action->IExecAction_iface; + + TRACE("created %p\n", *obj); + + return S_OK; +} + +typedef struct +{ IActionCollection IActionCollection_iface; LONG ref; } Actions; @@ -1744,8 +1919,17 @@ static HRESULT WINAPI Actions_put_XmlText(IActionCollection *iface, BSTR xml) static HRESULT WINAPI Actions_Create(IActionCollection *iface, TASK_ACTION_TYPE type, IAction **action) { - FIXME("%p,%u,%p: stub\n", iface, type, action); - return E_NOTIMPL; + TRACE("%p,%u,%p\n", iface, type, action); + + switch (type) + { + case TASK_ACTION_EXEC: + return ExecAction_create((IExecAction **)action); + + default: + FIXME("unimplemented type %u\n", type); + return E_NOTIMPL; + } } static HRESULT WINAPI Actions_Remove(IActionCollection *iface, VARIANT index) diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 1df79d5..22854d9 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1235,23 +1235,22 @@ static void create_action(ITaskDefinition *taskdef) IActionCollection *actions; IAction *action; IExecAction *exec_action; + TASK_ACTION_TYPE type; hr = ITaskDefinition_get_Actions(taskdef, &actions); ok(hr == S_OK, "get_Actions error %#x\n", hr); hr = IActionCollection_Create(actions, TASK_ACTION_EXEC, &action); -todo_wine ok(hr == S_OK, "Create action error %#x\n", hr); - /* FIXME: Remove once implemented */ - if (hr != S_OK) - { - IActionCollection_Release(actions); - return; - } hr = IAction_QueryInterface(action, &IID_IExecAction, (void **)&exec_action); ok(hr == S_OK, "QueryInterface error %#x\n", hr); + type = 0xdeadbeef; + hr = IExecAction_get_Type(exec_action, &type); + ok(hr == S_OK, "get_Type error %#x\n", hr); + ok(type == TASK_ACTION_EXEC, "got %u\n", type ); + hr = IExecAction_put_Path(exec_action, task1_exe); ok(hr == S_OK, "put_Path error %#x\n", hr);
1
0
0
0
Hans Leidekker : taskschd: Implement ITaskDefinition_put_Actions.
by Alexandre Julliard
30 Nov '17
30 Nov '17
Module: wine Branch: master Commit: 759ef6a4fa8be8b9696552d5b89cf46f0f3950ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=759ef6a4fa8be8b9696552d5b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 30 09:37:08 2017 +0100 taskschd: Implement ITaskDefinition_put_Actions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/taskschd/task.c | 15 +++++++++++++-- dlls/taskschd/tests/scheduler.c | 10 ++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 166e587..1c20f83 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -2093,8 +2093,19 @@ static HRESULT WINAPI TaskDefinition_get_Actions(ITaskDefinition *iface, IAction static HRESULT WINAPI TaskDefinition_put_Actions(ITaskDefinition *iface, IActionCollection *actions) { - FIXME("%p,%p: stub\n", iface, actions); - return E_NOTIMPL; + TaskDefinition *taskdef = impl_from_ITaskDefinition(iface); + + TRACE("%p,%p\n", iface, actions); + + if (!actions) return E_POINTER; + + if (taskdef->actions) + IActionCollection_Release(taskdef->actions); + + IActionCollection_AddRef(actions); + taskdef->actions = actions; + + return S_OK; } static const WCHAR Task[] = {'T','a','s','k',0}; diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 3d1d18e..1df79d5 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1096,6 +1096,7 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test) ITaskSettings *set; ITriggerCollection *triggers; IPrincipal *principal; + IActionCollection *actions; hr = ITaskDefinition_get_Settings(taskdef, &set); ok(hr == S_OK, "get_Settings error %#x\n", hr); @@ -1178,6 +1179,15 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test) ok(hr == S_OK, "expected S_OK, got %#x\n", hr); if (principal) IPrincipal_Release(principal); + actions = NULL; + hr = ITaskDefinition_get_Actions(taskdef, &actions); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(actions != NULL, "actions not set\n"); + + hr = ITaskDefinition_put_Actions(taskdef, actions); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + if (actions) IActionCollection_Release(actions); + /* FIXME: set IIdleSettings and INetworkSettings */ ITaskSettings_Release(set);
1
0
0
0
← Newer
1
2
3
4
5
...
44
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
Results per page:
10
25
50
100
200