winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2022
----- 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
907 discussions
Start a n
N
ew thread
Rémi Bernon : ntdll: Move the main subheap after the free lists.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: f00da96a0112f101f20a5213aa6568bb72c8d7bd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f00da96a0112f101f20a5213…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun May 1 17:48:06 2022 +0200 ntdll: Move the main subheap after the free lists. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/heap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 89c32fe4fa9..4425b0cd91e 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -186,7 +186,6 @@ typedef struct tagHEAP /* end of the Windows 10 compatible struct layout */ BOOL shared; /* System shared heap */ - SUBHEAP subheap; /* First sub-heap */ struct list entry; /* Entry in process heap list */ struct list subheap_list; /* Sub-heap list */ struct list large_list; /* Large blocks list */ @@ -195,7 +194,8 @@ typedef struct tagHEAP DWORD pending_pos; /* Position in pending free requests ring */ ARENA_INUSE **pending_free; /* Ring buffer for pending free requests */ RTL_CRITICAL_SECTION cs; - FREE_LIST_ENTRY *freeList; /* Free lists */ + FREE_LIST_ENTRY freeList[HEAP_NB_FREE_LISTS]; + SUBHEAP subheap; } HEAP; #define HEAP_MAGIC ((DWORD)('H' | ('E'<<8) | ('A'<<16) | ('P'<<24))) @@ -1008,8 +1008,6 @@ static SUBHEAP *HEAP_CreateSubHeap( HEAP *heap, LPVOID address, DWORD flags, /* Build the free lists */ - heap->freeList = (FREE_LIST_ENTRY *)((char *)heap + subheap->headerSize); - subheap->headerSize += HEAP_NB_FREE_LISTS * sizeof(FREE_LIST_ENTRY); list_init( &heap->freeList[0].arena.entry ); for (i = 0, pEntry = heap->freeList; i < HEAP_NB_FREE_LISTS; i++, pEntry++) {
1
0
0
0
Rémi Bernon : ntdll: Set ARENA_FLAG_FREE flag in HEAP_CreateFreeBlock.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 523da9157f7d202da43fed36424651b1ca37e734 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=523da9157f7d202da43fed36…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon May 2 14:20:56 2022 +0200 ntdll: Set ARENA_FLAG_FREE flag in HEAP_CreateFreeBlock. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/heap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 8706b0f7774..89c32fe4fa9 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -600,7 +600,6 @@ static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL la /* insert at head of free list */ list_add_after( &pEntry->arena.entry, &pArena->entry ); } - pArena->size |= ARENA_FLAG_FREE; } @@ -726,7 +725,7 @@ static void HEAP_CreateFreeBlock( SUBHEAP *subheap, void *ptr, SIZE_T size ) /* Last, insert the new block into the free list */ - pFree->size = size - sizeof(*pFree); + pFree->size = (size - sizeof(*pFree)) | ARENA_FLAG_FREE; HEAP_InsertFreeBlock( subheap->heap, pFree, last ); }
1
0
0
0
Rémi Bernon : ntdll: Mask block flags when computing HEAP_InsertFreeBlock size.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: ba21d8fd5472e7c304bb65775a954a16771f7442 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ba21d8fd5472e7c304bb6577…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 3 18:31:28 2022 +0200 ntdll: Mask block flags when computing HEAP_InsertFreeBlock size. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/heap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 6e64d0d7dfb..8706b0f7774 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -586,7 +586,8 @@ static HEAP *HEAP_GetPtr( */ static inline void HEAP_InsertFreeBlock( HEAP *heap, ARENA_FREE *pArena, BOOL last ) { - FREE_LIST_ENTRY *pEntry = heap->freeList + get_freelist_index( pArena->size + sizeof(*pArena) ); + SIZE_T block_size = (pArena->size & ARENA_SIZE_MASK) + sizeof(*pArena); + FREE_LIST_ENTRY *pEntry = heap->freeList + get_freelist_index( block_size ); if (last) { /* insert at end of free list, i.e. before the next free list entry */
1
0
0
0
Andrew Eikum : mfplat/tests: Add tests for IMFByteStream position.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 0416d2f167dc852fca9a41ecf398b32409665657 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0416d2f167dc852fca9a41ec…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu May 5 11:02:57 2022 -0500 mfplat/tests: Add tests for IMFByteStream position. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/tests/mfplat.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 3f7ab161b59..28b89de4b1f 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1972,6 +1972,7 @@ static void test_MFCreateMFByteStreamOnStream(void) ULONG ref, size; HRESULT hr; UINT count; + QWORD to; if(!pMFCreateMFByteStreamOnStream) { @@ -2055,11 +2056,45 @@ static void test_MFCreateMFByteStreamOnStream(void) ok(hr == S_OK, "Failed to get stream capabilities, hr %#lx.\n", hr); ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#lx.\n", caps); + /* IMFByteStream maintains position separately from IStream */ + caps = 0; + hr = IStream_Read(stream, &caps, sizeof(caps), &size); + ok(hr == S_OK, "Failed to read from raw stream, hr %#lx.\n", hr); + ok(size == 4, "Unexpected size.\n"); + ok(caps == 0xffff0000, "Unexpected content.\n"); + caps = 0; hr = IMFByteStream_Read(bytestream, (BYTE *)&caps, sizeof(caps), &size); ok(hr == S_OK, "Failed to read from stream, hr %#lx.\n", hr); + ok(size == 4, "Unexpected size.\n"); ok(caps == 0xffff0000, "Unexpected content.\n"); + caps = 0; + hr = IStream_Read(stream, &caps, sizeof(caps), &size); + ok(hr == S_OK, "Failed to read from raw stream, hr %#lx.\n", hr); + ok(size == 0, "Unexpected size.\n"); + ok(caps == 0, "Unexpected content.\n"); + + hr = IMFByteStream_Seek(bytestream, msoBegin, 0, 0, &to); + ok(hr == S_OK, "Failed to read from stream, hr %#lx.\n", hr); + + hr = IStream_Read(stream, &caps, sizeof(caps), &size); + ok(hr == S_OK, "Failed to read from raw stream, hr %#lx.\n", hr); + ok(size == 0, "Unexpected size.\n"); + ok(caps == 0, "Unexpected content.\n"); + + caps = 0; + hr = IMFByteStream_Read(bytestream, (BYTE *)&caps, sizeof(caps), &size); + ok(hr == S_OK, "Failed to read from stream, hr %#lx.\n", hr); + ok(size == 4, "Unexpected size.\n"); + ok(caps == 0xffff0000, "Unexpected content.\n"); + + caps = 0; + hr = IMFByteStream_Read(bytestream, (BYTE *)&caps, sizeof(caps), &size); + ok(hr == S_OK, "Failed to read from stream, hr %#lx.\n", hr); + ok(size == 0, "Unexpected size.\n"); + ok(caps == 0, "Unexpected content.\n"); + IMFAttributes_Release(attributes); IMFByteStream_Release(bytestream); IStream_Release(stream);
1
0
0
0
Andrew Eikum : mfplat: Consolidate stream and file IMFByteStream Read/Write callback vtables.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 0c2f1121cc8caa5815ea48ccbe7f891f6891f39e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0c2f1121cc8caa5815ea48cc…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu May 5 10:35:28 2022 -0500 mfplat: Consolidate stream and file IMFByteStream Read/Write callback vtables. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 52 ++++++++++------------------------------------------ 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 8cdf0d1c71f..1e4e026d1d7 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -4369,7 +4369,7 @@ static const IMFAttributesVtbl bytestream_attributes_vtbl = mfattributes_CopyAllItems }; -static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) +static HRESULT WINAPI bytestream_read_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) { struct bytestream *stream = impl_from_read_callback_IRtwqAsyncCallback(iface); struct async_stream_op *op; @@ -4395,7 +4395,7 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback return S_OK; } -static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) +static HRESULT WINAPI bytestream_write_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) { struct bytestream *stream = impl_from_read_callback_IRtwqAsyncCallback(iface); struct async_stream_op *op; @@ -4421,22 +4421,22 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback return S_OK; } -static const IRtwqAsyncCallbackVtbl bytestream_stream_read_callback_vtbl = +static const IRtwqAsyncCallbackVtbl bytestream_read_callback_vtbl = { bytestream_callback_QueryInterface, bytestream_read_callback_AddRef, bytestream_read_callback_Release, bytestream_callback_GetParameters, - bytestream_stream_read_callback_Invoke, + bytestream_read_callback_Invoke, }; -static const IRtwqAsyncCallbackVtbl bytestream_stream_write_callback_vtbl = +static const IRtwqAsyncCallbackVtbl bytestream_write_callback_vtbl = { bytestream_callback_QueryInterface, bytestream_write_callback_AddRef, bytestream_write_callback_Release, bytestream_callback_GetParameters, - bytestream_stream_write_callback_Invoke, + bytestream_write_callback_Invoke, }; /*********************************************************************** @@ -4462,8 +4462,8 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt object->IMFByteStream_iface.lpVtbl = &bytestream_stream_vtbl; object->attributes.IMFAttributes_iface.lpVtbl = &bytestream_attributes_vtbl; - object->read_callback.lpVtbl = &bytestream_stream_read_callback_vtbl; - object->write_callback.lpVtbl = &bytestream_stream_write_callback_vtbl; + object->read_callback.lpVtbl = &bytestream_read_callback_vtbl; + object->write_callback.lpVtbl = &bytestream_write_callback_vtbl; InitializeCriticalSection(&object->cs); list_init(&object->pending); @@ -4487,38 +4487,6 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt return S_OK; } -static HRESULT WINAPI bytestream_file_read_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) -{ - FIXME("%p, %p.\n", iface, result); - - return E_NOTIMPL; -} - -static HRESULT WINAPI bytestream_file_write_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result) -{ - FIXME("%p, %p.\n", iface, result); - - return E_NOTIMPL; -} - -static const IRtwqAsyncCallbackVtbl bytestream_file_read_callback_vtbl = -{ - bytestream_callback_QueryInterface, - bytestream_read_callback_AddRef, - bytestream_read_callback_Release, - bytestream_callback_GetParameters, - bytestream_file_read_callback_Invoke, -}; - -static const IRtwqAsyncCallbackVtbl bytestream_file_write_callback_vtbl = -{ - bytestream_callback_QueryInterface, - bytestream_write_callback_AddRef, - bytestream_write_callback_Release, - bytestream_callback_GetParameters, - bytestream_file_write_callback_Invoke, -}; - static HRESULT WINAPI bytestream_file_getservice_QueryInterface(IMFGetService *iface, REFIID riid, void **obj) { struct bytestream *stream = impl_bytestream_from_IMFGetService(iface); @@ -4625,8 +4593,8 @@ static HRESULT create_file_bytestream(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPE object->IMFByteStream_iface.lpVtbl = &bytestream_file_vtbl; object->attributes.IMFAttributes_iface.lpVtbl = &bytestream_attributes_vtbl; object->IMFGetService_iface.lpVtbl = &bytestream_file_getservice_vtbl; - object->read_callback.lpVtbl = &bytestream_file_read_callback_vtbl; - object->write_callback.lpVtbl = &bytestream_file_write_callback_vtbl; + object->read_callback.lpVtbl = &bytestream_read_callback_vtbl; + object->write_callback.lpVtbl = &bytestream_write_callback_vtbl; InitializeCriticalSection(&object->cs); list_init(&object->pending); object->capabilities = capabilities;
1
0
0
0
Andrew Eikum : mfplat: Simplify IMFByteStream async Read/Write methods.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 411ef13e7c2bbc43afcfc8fe1a1e251b79a059be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=411ef13e7c2bbc43afcfc8fe…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu May 5 10:33:14 2022 -0500 mfplat: Simplify IMFByteStream async Read/Write methods. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 9e6ff26b2f7..8cdf0d1c71f 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -4373,7 +4373,6 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback { struct bytestream *stream = impl_from_read_callback_IRtwqAsyncCallback(iface); struct async_stream_op *op; - LARGE_INTEGER position; IUnknown *object; HRESULT hr; @@ -4384,13 +4383,8 @@ static HRESULT WINAPI bytestream_stream_read_callback_Invoke(IRtwqAsyncCallback EnterCriticalSection(&stream->cs); - position.QuadPart = op->position; - if (SUCCEEDED(hr = IStream_Seek(stream->stream, position, STREAM_SEEK_SET, NULL))) - { - if (SUCCEEDED(hr = IStream_Read(stream->stream, op->u.dest, op->requested_length, &op->actual_length))) - stream->position += op->actual_length; - } - + hr = IMFByteStream_Read(&stream->IMFByteStream_iface, op->u.dest, op->requested_length, &op->actual_length); + if(FAILED(hr)) TRACE("Read failed: %#lx\n", hr); IMFAsyncResult_SetStatus(op->caller, hr); list_add_tail(&stream->pending, &op->entry); @@ -4405,7 +4399,6 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback { struct bytestream *stream = impl_from_read_callback_IRtwqAsyncCallback(iface); struct async_stream_op *op; - LARGE_INTEGER position; IUnknown *object; HRESULT hr; @@ -4416,13 +4409,8 @@ static HRESULT WINAPI bytestream_stream_write_callback_Invoke(IRtwqAsyncCallback EnterCriticalSection(&stream->cs); - position.QuadPart = op->position; - if (SUCCEEDED(hr = IStream_Seek(stream->stream, position, STREAM_SEEK_SET, NULL))) - { - if (SUCCEEDED(hr = IStream_Write(stream->stream, op->u.src, op->requested_length, &op->actual_length))) - stream->position += op->actual_length; - } - + hr = IMFByteStream_Write(&stream->IMFByteStream_iface, op->u.src, op->requested_length, &op->actual_length); + if(FAILED(hr)) TRACE("Write failed: %#lx\n", hr); IMFAsyncResult_SetStatus(op->caller, hr); list_add_tail(&stream->pending, &op->entry);
1
0
0
0
Andrew Eikum : mfplat: Consolidate stream and file IMFByteStream vtables.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 4c999efdfb6df56e48deec14444442415d8d1ae2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4c999efdfb6df56e48deec14…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu May 5 09:54:13 2022 -0500 mfplat: Consolidate stream and file IMFByteStream vtables. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 99 ++++++++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 59 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 24d39d81b62..9e6ff26b2f7 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -3954,7 +3954,7 @@ static HRESULT WINAPI bytestream_stream_GetCapabilities(IMFByteStream *iface, DW return S_OK; } -static HRESULT WINAPI bytestream_GetCapabilities(IMFByteStream *iface, DWORD *capabilities) +static HRESULT WINAPI bytestream_file_GetCapabilities(IMFByteStream *iface, DWORD *capabilities) { struct bytestream *stream = impl_from_IMFByteStream(iface); @@ -3965,14 +3965,14 @@ static HRESULT WINAPI bytestream_GetCapabilities(IMFByteStream *iface, DWORD *ca return S_OK; } -static HRESULT WINAPI bytestream_SetLength(IMFByteStream *iface, QWORD length) +static HRESULT WINAPI bytestream_file_SetLength(IMFByteStream *iface, QWORD length) { FIXME("%p, %s\n", iface, wine_dbgstr_longlong(length)); return E_NOTIMPL; } -static HRESULT WINAPI bytestream_file_GetCurrentPosition(IMFByteStream *iface, QWORD *position) +static HRESULT WINAPI bytestream_GetCurrentPosition(IMFByteStream *iface, QWORD *position) { struct bytestream *stream = impl_from_IMFByteStream(iface); @@ -4070,7 +4070,7 @@ static HRESULT WINAPI bytestream_EndRead(IMFByteStream *iface, IMFAsyncResult *r return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_READ, result, byte_read); } -static HRESULT WINAPI bytestream_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written) +static HRESULT WINAPI bytestream_file_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written) { FIXME("%p, %p, %lu, %p\n", iface, data, count, written); @@ -4096,22 +4096,44 @@ static HRESULT WINAPI bytestream_EndWrite(IMFByteStream *iface, IMFAsyncResult * return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_WRITE, result, written); } -static HRESULT WINAPI bytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN seek, LONGLONG offset, - DWORD flags, QWORD *current) +static HRESULT WINAPI bytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN origin, LONGLONG offset, + DWORD flags, QWORD *current) { - FIXME("%p, %u, %s, 0x%08lx, %p\n", iface, seek, wine_dbgstr_longlong(offset), flags, current); + struct bytestream *stream = impl_from_IMFByteStream(iface); + HRESULT hr = S_OK; - return E_NOTIMPL; + TRACE("%p, %u, %s, %#lx, %p.\n", iface, origin, wine_dbgstr_longlong(offset), flags, current); + + EnterCriticalSection(&stream->cs); + + switch (origin) + { + case msoBegin: + stream->position = offset; + break; + case msoCurrent: + stream->position += offset; + break; + default: + WARN("Unknown origin mode %d.\n", origin); + hr = E_INVALIDARG; + } + + *current = stream->position; + + LeaveCriticalSection(&stream->cs); + + return hr; } -static HRESULT WINAPI bytestream_Flush(IMFByteStream *iface) +static HRESULT WINAPI bytestream_file_Flush(IMFByteStream *iface) { FIXME("%p\n", iface); return E_NOTIMPL; } -static HRESULT WINAPI bytestream_Close(IMFByteStream *iface) +static HRESULT WINAPI bytestream_file_Close(IMFByteStream *iface) { FIXME("%p\n", iface); @@ -4136,21 +4158,21 @@ static const IMFByteStreamVtbl bytestream_file_vtbl = bytestream_QueryInterface, bytestream_AddRef, bytestream_Release, - bytestream_GetCapabilities, + bytestream_file_GetCapabilities, bytestream_file_GetLength, - bytestream_SetLength, - bytestream_file_GetCurrentPosition, + bytestream_file_SetLength, + bytestream_GetCurrentPosition, bytestream_SetCurrentPosition, bytestream_file_IsEndOfStream, bytestream_file_Read, bytestream_BeginRead, bytestream_EndRead, - bytestream_Write, + bytestream_file_Write, bytestream_BeginWrite, bytestream_EndWrite, bytestream_Seek, - bytestream_Flush, - bytestream_Close + bytestream_file_Flush, + bytestream_file_Close }; static HRESULT WINAPI bytestream_stream_GetLength(IMFByteStream *iface, QWORD *length) @@ -4187,17 +4209,6 @@ static HRESULT WINAPI bytestream_stream_SetLength(IMFByteStream *iface, QWORD le return hr; } -static HRESULT WINAPI bytestream_stream_GetCurrentPosition(IMFByteStream *iface, QWORD *position) -{ - struct bytestream *stream = impl_from_IMFByteStream(iface); - - TRACE("%p, %p.\n", iface, position); - - *position = stream->position; - - return S_OK; -} - static HRESULT WINAPI bytestream_stream_IsEndOfStream(IMFByteStream *iface, BOOL *ret) { struct bytestream *stream = impl_from_IMFByteStream(iface); @@ -4260,36 +4271,6 @@ static HRESULT WINAPI bytestream_stream_Write(IMFByteStream *iface, const BYTE * return hr; } -static HRESULT WINAPI bytestream_stream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN origin, LONGLONG offset, - DWORD flags, QWORD *current) -{ - struct bytestream *stream = impl_from_IMFByteStream(iface); - HRESULT hr = S_OK; - - TRACE("%p, %u, %s, %#lx, %p.\n", iface, origin, wine_dbgstr_longlong(offset), flags, current); - - EnterCriticalSection(&stream->cs); - - switch (origin) - { - case msoBegin: - stream->position = offset; - break; - case msoCurrent: - stream->position += offset; - break; - default: - WARN("Unknown origin mode %d.\n", origin); - hr = E_INVALIDARG; - } - - *current = stream->position; - - LeaveCriticalSection(&stream->cs); - - return hr; -} - static HRESULT WINAPI bytestream_stream_Flush(IMFByteStream *iface) { struct bytestream *stream = impl_from_IMFByteStream(iface); @@ -4314,7 +4295,7 @@ static const IMFByteStreamVtbl bytestream_stream_vtbl = bytestream_stream_GetCapabilities, bytestream_stream_GetLength, bytestream_stream_SetLength, - bytestream_stream_GetCurrentPosition, + bytestream_GetCurrentPosition, bytestream_SetCurrentPosition, bytestream_stream_IsEndOfStream, bytestream_stream_Read, @@ -4323,7 +4304,7 @@ static const IMFByteStreamVtbl bytestream_stream_vtbl = bytestream_stream_Write, bytestream_BeginWrite, bytestream_EndWrite, - bytestream_stream_Seek, + bytestream_Seek, bytestream_stream_Flush, bytestream_stream_Close, };
1
0
0
0
Rémi Bernon : combase: Lookup activatable class library in the activation context.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: ea0fa9f1dce7e8f5712d2612204b0bde83cde53b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ea0fa9f1dce7e8f5712d2612…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Apr 5 23:37:01 2022 +0200 combase: Lookup activatable class library in the activation context. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/roapi.c | 21 +++++++++++++++++++++ dlls/combase/tests/roapi.c | 8 ++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index eadf0ac2ecb..78f35de39d4 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -37,8 +37,18 @@ static const char *debugstr_hstring(HSTRING hstr) return wine_dbgstr_wn(str, len); } +struct activatable_class_data +{ + ULONG size; + DWORD unk; + DWORD module_len; + DWORD module_offset; + DWORD threading_model; +}; + static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out) { + ACTCTX_SECTION_KEYED_DATA data; HKEY hkey_root, hkey_class; DWORD type, size; HRESULT hr; @@ -46,6 +56,17 @@ static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out) *out = NULL; + /* search activation context first */ + data.cbSize = sizeof(data); + if (FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL, + ACTIVATION_CONTEXT_SECTION_WINRT_ACTIVATABLE_CLASSES, classid, &data)) + { + struct activatable_class_data *activatable_class = (struct activatable_class_data *)data.lpData; + void *ptr = (BYTE *)data.lpSectionBase + activatable_class->module_offset; + *out = wcsdup(ptr); + return S_OK; + } + /* load class registry key */ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\WindowsRuntime\\ActivatableClassId", 0, KEY_READ, &hkey_root)) diff --git a/dlls/combase/tests/roapi.c b/dlls/combase/tests/roapi.c index 579b1502797..f10cbb4507b 100644 --- a/dlls/combase/tests/roapi.c +++ b/dlls/combase/tests/roapi.c @@ -95,21 +95,19 @@ static void test_ActivationFactories(void) todo_wine ok(hr == E_NOTIMPL || broken(hr == REGDB_E_CLASSNOTREG) /* <= w1064v1809 */, "RoGetActivationFactory returned %#lx.\n", hr); + todo_wine ok(factory == NULL, "got factory %p.\n", factory); + if (factory) IActivationFactory_Release(factory); WindowsDeleteString(str); hr = WindowsCreateString(L"Wine.Test.Trusted", ARRAY_SIZE(L"Wine.Test.Trusted") - 1, &str); ok(hr == S_OK, "WindowsCreateString returned %#lx.\n", hr); hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); - todo_wine ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /* <= w1064v1809 */, "RoGetActivationFactory returned %#lx.\n", hr); if (hr == REGDB_E_CLASSNOTREG) ok(!factory, "got factory %p.\n", factory); else - { - todo_wine ok(!!factory, "got factory %p.\n", factory); - } if (!factory) ref = 0; else ref = IActivationFactory_Release(factory); ok(ref == 0, "Release returned %lu\n", ref); @@ -126,6 +124,8 @@ START_TEST(roapi) test_ActivationFactories(); + SetLastError(0xdeadbeef); ret = DeleteFileW(L"wine.combase.test.dll"); + todo_wine_if(!ret && GetLastError() == ERROR_ACCESS_DENIED) ok(ret, "Failed to delete file, error %lu\n", GetLastError()); }
1
0
0
0
Rémi Bernon : combase: Use CRT memory allocation functions.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 9d1beee6c753f1ad864fb11d16598f09c3f0f510 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9d1beee6c753f1ad864fb11d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu May 19 11:30:40 2022 +0200 combase: Use CRT memory allocation functions. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/apartment.c | 36 ++++++++++----------- dlls/combase/combase.c | 35 ++++++++++----------- dlls/combase/combase_private.h | 1 - dlls/combase/errorinfo.c | 40 +++++++----------------- dlls/combase/hglobalstream.c | 12 +++---- dlls/combase/malloc.c | 1 - dlls/combase/marshal.c | 29 +++++++++-------- dlls/combase/roapi.c | 10 +++--- dlls/combase/rpc.c | 71 +++++++++++++++++++++--------------------- dlls/combase/string.c | 4 +-- dlls/combase/stubmanager.c | 16 +++++----- dlls/combase/usrmarshal.c | 4 +-- 12 files changed, 118 insertions(+), 141 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9d1beee6c753f1ad864f…
1
0
0
0
Rémi Bernon : kernel32/tests: Mark activatableClass wrong xmlns test as broken on w1064v1909.
by Alexandre Julliard
20 May '22
20 May '22
Module: wine Branch: master Commit: 0f9ad11a27b82f8aee2b56e4cb139057464a0c79 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0f9ad11a27b82f8aee2b56e4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Apr 22 11:53:39 2022 +0200 kernel32/tests: Mark activatableClass wrong xmlns test as broken on w1064v1909. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/actctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 71337c0f38e..bec04b7f066 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -1108,7 +1108,7 @@ static void test_create_fail(void) trace("wrong_manifest10\n"); test_create_and_fail(wrong_manifest10, NULL, 0, TRUE /* WinXP */); trace("wrong_manifest11\n"); - test_create_and_fail(wrong_manifest11, NULL, 1, FALSE); + test_create_and_fail(wrong_manifest11, NULL, 1, TRUE /* w1064v1909 */); trace("UTF-16 manifest1 without BOM\n"); test_create_wide_and_fail(manifest1, FALSE ); trace("manifest2\n");
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
91
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200