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 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
951 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: cdfdfc382b6cc307efcd51d5989eff8bca082e1e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cdfdfc382b6cc307efcd51d5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Nov 8 21:47:02 2018 +0330 wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 5 +++++ dlls/wined3d/swapchain.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3697b8f..b1a322e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4756,6 +4756,11 @@ static void update_swapchain_flags(struct wined3d_texture *texture) { unsigned int flags = texture->swapchain->desc.flags; + if (flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER) + texture->resource.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + else + texture->resource.access &= ~(WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W); + if (flags & WINED3D_SWAPCHAIN_GDI_COMPATIBLE) texture->flags |= WINED3D_TEXTURE_GET_DC; else diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 499e163..b95623b 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -838,6 +838,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 texture_desc.usage |= WINED3DUSAGE_OWNDC; texture_desc.bind_flags = 0; texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU; + if (swapchain->desc.flags & WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER) + texture_desc.access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; texture_desc.width = swapchain->desc.backbuffer_width; texture_desc.height = swapchain->desc.backbuffer_height; texture_desc.depth = 1; @@ -947,6 +949,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 texture_desc.format = swapchain->desc.auto_depth_stencil_format; texture_desc.usage = 0; texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL; + texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU; if (FAILED(hr = device->device_parent->ops->create_swapchain_texture(device->device_parent, device->device_parent, &texture_desc, 0, &ds)))
1
0
0
0
Fabian Maurer : make_specfiles: Add kernelbase for api-ms-win-core-synch-*.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: e4ffe65899c225dbbb8bc97d644ff649e72a63ac URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4ffe65899c225dbbb8bc97d…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Thu Nov 8 18:28:19 2018 +0100 make_specfiles: Add kernelbase for api-ms-win-core-synch-*. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec | 6 +++--- dlls/api-ms-win-core-synch-l1-2-1/api-ms-win-core-synch-l1-2-1.spec | 6 +++--- tools/make_specfiles | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec b/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec index d35fe78..84beb97 100644 --- a/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec +++ b/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec @@ -51,8 +51,8 @@ @ stdcall WaitForMultipleObjectsEx(long ptr long long long) kernel32.WaitForMultipleObjectsEx @ stdcall WaitForSingleObject(long long) kernel32.WaitForSingleObject @ stdcall WaitForSingleObjectEx(long long long) kernel32.WaitForSingleObjectEx -@ stub WaitOnAddress +@ stdcall WaitOnAddress(ptr ptr long long) kernelbase.WaitOnAddress @ stdcall WakeAllConditionVariable(ptr) kernel32.WakeAllConditionVariable -@ stub WakeByAddressAll -@ stub WakeByAddressSingle +@ stdcall WakeByAddressAll(ptr) kernelbase.WakeByAddressAll +@ stdcall WakeByAddressSingle(ptr) kernelbase.WakeByAddressSingle @ stdcall WakeConditionVariable(ptr) kernel32.WakeConditionVariable diff --git a/dlls/api-ms-win-core-synch-l1-2-1/api-ms-win-core-synch-l1-2-1.spec b/dlls/api-ms-win-core-synch-l1-2-1/api-ms-win-core-synch-l1-2-1.spec index 84f40fa..9e53367 100644 --- a/dlls/api-ms-win-core-synch-l1-2-1/api-ms-win-core-synch-l1-2-1.spec +++ b/dlls/api-ms-win-core-synch-l1-2-1/api-ms-win-core-synch-l1-2-1.spec @@ -54,8 +54,8 @@ @ stdcall WaitForMultipleObjectsEx(long ptr long long long) kernel32.WaitForMultipleObjectsEx @ stdcall WaitForSingleObject(long long) kernel32.WaitForSingleObject @ stdcall WaitForSingleObjectEx(long long long) kernel32.WaitForSingleObjectEx -@ stub WaitOnAddress +@ stdcall WaitOnAddress(ptr ptr long long) kernelbase.WaitOnAddress @ stdcall WakeAllConditionVariable(ptr) kernel32.WakeAllConditionVariable -@ stub WakeByAddressAll -@ stub WakeByAddressSingle +@ stdcall WakeByAddressAll(ptr) kernelbase.WakeByAddressAll +@ stdcall WakeByAddressSingle(ptr) kernelbase.WakeByAddressSingle @ stdcall WakeConditionVariable(ptr) kernel32.WakeConditionVariable diff --git a/tools/make_specfiles b/tools/make_specfiles index b05afb8..ffb3bae 100755 --- a/tools/make_specfiles +++ b/tools/make_specfiles @@ -194,6 +194,7 @@ my @dll_groups = ], [ "kernel32", + "kernelbase", "api-ms-win-appmodel-identity-l1-1-0", "api-ms-win-appmodel-runtime-l1-1-1", "api-ms-win-downlevel-normaliz-l1-1-0",
1
0
0
0
Akihiro Sagawa : gdiplus: Add 4bppIndexed to the list of supported formats.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 0e082c0416b49dede36e5012ec875e6bb41d110c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e082c0416b49dede36e5012…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Nov 8 22:17:06 2018 +0900 gdiplus: Add 4bppIndexed to the list of supported formats. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/image.c | 1 + dlls/gdiplus/tests/image.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index ccfa165..2e844cf 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -55,6 +55,7 @@ static const struct { { &GUID_WICPixelFormatBlackWhite, PixelFormat1bppIndexed, WICBitmapPaletteTypeFixedBW }, { &GUID_WICPixelFormat1bppIndexed, PixelFormat1bppIndexed, WICBitmapPaletteTypeFixedBW }, + { &GUID_WICPixelFormat4bppIndexed, PixelFormat4bppIndexed, WICBitmapPaletteTypeFixedHalftone8 }, { &GUID_WICPixelFormat8bppGray, PixelFormat8bppIndexed, WICBitmapPaletteTypeFixedGray256 }, { &GUID_WICPixelFormat8bppIndexed, PixelFormat8bppIndexed, WICBitmapPaletteTypeFixedHalftone256 }, { &GUID_WICPixelFormat16bppBGR555, PixelFormat16bppRGB555, WICBitmapPaletteTypeFixedHalftone256 }, diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 41ec4dc..b31f32e 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -5213,7 +5213,7 @@ static void test_png_color_formats(void) { 0, 0 }}}, { 4, PNG_COLOR_TYPE_PALETTE, {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, - { PixelFormat4bppIndexed, ImageFlagsColorSpaceRGB, TRUE }, + { PixelFormat4bppIndexed, ImageFlagsColorSpaceRGB }, { 0, 0 }}}, { 8, PNG_COLOR_TYPE_PALETTE, {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB },
1
0
0
0
Akihiro Sagawa : gdiplus: Convert to 32bppARGB when PNG image with transparency chunk is loaded. ( rebased).
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 748a246a8de172678a6e8b779b9378cf5fd0aca1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=748a246a8de172678a6e8b77…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Nov 8 22:17:04 2018 +0900 gdiplus: Convert to 32bppARGB when PNG image with transparency chunk is loaded. (rebased). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=44409
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/image.c | 41 +++++++++++++++++++++++++++++++++++++++++ dlls/gdiplus/tests/image.c | 10 +++++----- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index e9b0b08..ccfa165 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -3949,6 +3949,39 @@ static GpStatus decode_image_jpeg(IStream* stream, GpImage **image) return decode_image_wic(stream, &GUID_ContainerFormatJpeg, NULL, image); } +static BOOL has_png_transparency_chunk(IStream *pIStream) +{ + LARGE_INTEGER seek; + BOOL has_tRNS = FALSE; + HRESULT hr; + BYTE header[8]; + + seek.QuadPart = 8; + do + { + ULARGE_INTEGER chunk_start; + ULONG bytesread, chunk_size; + + hr = IStream_Seek(pIStream, seek, STREAM_SEEK_SET, &chunk_start); + if (FAILED(hr)) break; + + hr = IStream_Read(pIStream, header, 8, &bytesread); + if (FAILED(hr) || bytesread < 8) break; + + chunk_size = (header[0] << 24) | (header[1] << 16) | (header[2] << 8) | header[3]; + if (!memcmp(&header[4], "tRNS", 4)) + { + has_tRNS = TRUE; + break; + } + + seek.QuadPart = chunk_start.QuadPart + chunk_size + 12; /* skip data and CRC */ + } while (memcmp(&header[4], "IDAT", 4) && memcmp(&header[4], "IEND", 4)); + + TRACE("has_tRNS = %d\n", has_tRNS); + return has_tRNS; +} + static GpStatus decode_image_png(IStream* stream, GpImage **image) { IWICBitmapDecoder *decoder; @@ -3970,6 +4003,14 @@ static GpStatus decode_image_png(IStream* stream, GpImage **image) { if (IsEqualGUID(&format, &GUID_WICPixelFormat8bppGray)) force_conversion = TRUE; + else if ((IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat4bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat2bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat1bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat24bppBGR)) && + has_png_transparency_chunk(stream)) + force_conversion = TRUE; + status = decode_frame_wic(decoder, force_conversion, 0, png_metadata_reader, image); } else diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index ca78747..41ec4dc 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -5168,7 +5168,7 @@ static void test_png_color_formats(void) { 2, PNG_COLOR_TYPE_RGB }, { 4, PNG_COLOR_TYPE_RGB }, { 8, PNG_COLOR_TYPE_RGB, - {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE }, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, { PixelFormat24bppRGB, ImageFlagsColorSpaceRGB }, { PixelFormat24bppRGB, ImageFlagsColorSpaceRGB }}}, /* libpng refuses to load our test image complaining about extra compressed data, @@ -5182,7 +5182,7 @@ static void test_png_color_formats(void) /* 5 */ { 1, PNG_COLOR_TYPE_GRAY, - {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE }, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }, { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }}}, { 2, PNG_COLOR_TYPE_GRAY, @@ -5194,7 +5194,7 @@ static void test_png_color_formats(void) { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, { 8, PNG_COLOR_TYPE_GRAY, - {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE }, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, { 16, PNG_COLOR_TYPE_GRAY, @@ -5204,7 +5204,7 @@ static void test_png_color_formats(void) /* 10 */ { 1, PNG_COLOR_TYPE_PALETTE, - {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE }, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }, { 0, 0 }}}, { 2, PNG_COLOR_TYPE_PALETTE, @@ -5216,7 +5216,7 @@ static void test_png_color_formats(void) { PixelFormat4bppIndexed, ImageFlagsColorSpaceRGB, TRUE }, { 0, 0 }}}, { 8, PNG_COLOR_TYPE_PALETTE, - {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE }, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, { PixelFormat8bppIndexed, ImageFlagsColorSpaceRGB }, { 0, 0 }}}, { 16, PNG_COLOR_TYPE_PALETTE },
1
0
0
0
Akihiro Sagawa : gdiplus/tests: Add more PNG color format tests.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 5855ff78462f04dc7388560b7ca265274e43e711 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5855ff78462f04dc7388560b…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Nov 8 22:17:01 2018 +0900 gdiplus/tests: Add more PNG color format tests. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/image.c | 229 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 188 insertions(+), 41 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5855ff78462f04dc7388…
1
0
0
0
Nikolay Sivov : wincodecs: Add support for WICBitmapNoCache in CreateBitmapFromSource() for bitmap as a source.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 70a3e86997ad1c1419cd02b9b49db7953cf5c4e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70a3e86997ad1c1419cd02b9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 8 15:20:55 2018 +0300 wincodecs: Add support for WICBitmapNoCache in CreateBitmapFromSource() for bitmap as a source. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/imgfactory.c | 10 ++++++++++ dlls/windowscodecs/tests/bitmap.c | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index 78919a7..b564efc 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -19,6 +19,7 @@ #include "config.h" +#include <assert.h> #include <stdarg.h> #define COBJMACROS @@ -501,9 +502,18 @@ static HRESULT create_bitmap_from_source_rect(IWICBitmapSource *piBitmapSource, IWICPixelFormatInfo2 *formatinfo; WICPixelFormatNumericRepresentation format_type; + assert(!rect || (rect && option == WICBitmapCacheOnLoad)); + if (!piBitmapSource || !ppIBitmap) return E_INVALIDARG; + if (option == WICBitmapNoCache && SUCCEEDED(IWICBitmapSource_QueryInterface(piBitmapSource, + &IID_IWICBitmap, (void **)&result))) + { + *ppIBitmap = result; + return S_OK; + } + hr = IWICBitmapSource_GetSize(piBitmapSource, &width, &height); if (SUCCEEDED(hr) && rect) diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 61e985a..5c225d2 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -456,7 +456,6 @@ static void test_createbitmapfromsource(void) hr = IWICImagingFactory_CreateBitmapFromSource(factory, (IWICBitmapSource *)bitmap, WICBitmapNoCache, &bitmap2); ok(hr == S_OK, "IWICImagingFactory_CreateBitmapFromSource failed hr=%x\n", hr); -todo_wine ok(bitmap2 == bitmap, "Unexpected bitmap instance.\n"); IWICBitmap_Release(bitmap2);
1
0
0
0
Nikolay Sivov : wincodecs: Implement CreateBitmapFromSourceRect().
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: e26e3da6cde859c843dce8b9049838e1774b23a3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e26e3da6cde859c843dce8b9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 8 15:20:54 2018 +0300 wincodecs: Implement CreateBitmapFromSourceRect(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/imgfactory.c | 46 +++++++++++++++++++++++++++++------ dlls/windowscodecs/tests/bitmap.c | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index dbcc5f5..78919a7 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -486,9 +486,8 @@ static HRESULT WINAPI ImagingFactory_CreateBitmap(IWICImagingFactory2 *iface, return BitmapImpl_Create(uiWidth, uiHeight, 0, 0, NULL, 0, pixelFormat, option, ppIBitmap); } -static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory2 *iface, - IWICBitmapSource *piBitmapSource, WICBitmapCreateCacheOption option, - IWICBitmap **ppIBitmap) +static HRESULT create_bitmap_from_source_rect(IWICBitmapSource *piBitmapSource, const WICRect *rect, + WICBitmapCreateCacheOption option, IWICBitmap **ppIBitmap) { IWICBitmap *result; IWICBitmapLock *lock; @@ -502,13 +501,20 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory2 IWICPixelFormatInfo2 *formatinfo; WICPixelFormatNumericRepresentation format_type; - TRACE("(%p,%p,%u,%p)\n", iface, piBitmapSource, option, ppIBitmap); - if (!piBitmapSource || !ppIBitmap) return E_INVALIDARG; hr = IWICBitmapSource_GetSize(piBitmapSource, &width, &height); + if (SUCCEEDED(hr) && rect) + { + if (rect->X >= width || rect->Y >= height || rect->Width == 0 || rect->Height == 0) + return E_INVALIDARG; + + width = min(width - rect->X, rect->Width); + height = min(height - rect->Y, rect->Height); + } + if (SUCCEEDED(hr)) hr = IWICBitmapSource_GetPixelFormat(piBitmapSource, &pixelformat); @@ -539,7 +545,14 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory2 { UINT stride, buffersize; BYTE *buffer; - rc.X = rc.Y = 0; + + if (rect) + { + rc.X = rect->X; + rc.Y = rect->Y; + } + else + rc.X = rc.Y = 0; rc.Width = width; rc.Height = height; @@ -592,13 +605,30 @@ static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory2 return hr; } +static HRESULT WINAPI ImagingFactory_CreateBitmapFromSource(IWICImagingFactory2 *iface, + IWICBitmapSource *piBitmapSource, WICBitmapCreateCacheOption option, + IWICBitmap **ppIBitmap) +{ + TRACE("(%p,%p,%u,%p)\n", iface, piBitmapSource, option, ppIBitmap); + + return create_bitmap_from_source_rect(piBitmapSource, NULL, option, ppIBitmap); +} + static HRESULT WINAPI ImagingFactory_CreateBitmapFromSourceRect(IWICImagingFactory2 *iface, IWICBitmapSource *piBitmapSource, UINT x, UINT y, UINT width, UINT height, IWICBitmap **ppIBitmap) { - FIXME("(%p,%p,%u,%u,%u,%u,%p): stub\n", iface, piBitmapSource, x, y, width, + WICRect rect; + + TRACE("(%p,%p,%u,%u,%u,%u,%p)\n", iface, piBitmapSource, x, y, width, height, ppIBitmap); - return E_NOTIMPL; + + rect.X = x; + rect.Y = y; + rect.Width = width; + rect.Height = height; + + return create_bitmap_from_source_rect(piBitmapSource, &rect, WICBitmapCacheOnLoad, ppIBitmap); } static HRESULT WINAPI ImagingFactory_CreateBitmapFromMemory(IWICImagingFactory2 *iface, diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 6e01f0b..61e985a 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -452,6 +452,20 @@ static void test_createbitmapfromsource(void) hr = IWICBitmap_SetResolution(bitmap, 12.0, 34.0); ok(hr == S_OK, "IWICBitmap_SetResolution failed hr=%x\n", hr); + /* WICBitmapNoCache */ + hr = IWICImagingFactory_CreateBitmapFromSource(factory, (IWICBitmapSource *)bitmap, + WICBitmapNoCache, &bitmap2); + ok(hr == S_OK, "IWICImagingFactory_CreateBitmapFromSource failed hr=%x\n", hr); +todo_wine + ok(bitmap2 == bitmap, "Unexpected bitmap instance.\n"); + + IWICBitmap_Release(bitmap2); + + bitmap2 = (void *)0xdeadbeef; + hr = IWICImagingFactory_CreateBitmapFromSource(factory, &bitmapsource, WICBitmapNoCache, &bitmap2); + ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(bitmap2 == (void *)0xdeadbeef, "Unexpected pointer %p.\n", bitmap2); + hr = IWICImagingFactory_CreateBitmapFromSource(factory, (IWICBitmapSource*)bitmap, WICBitmapCacheOnLoad, &bitmap2); ok(hr == S_OK, "IWICImagingFactory_CreateBitmapFromSource failed hr=%x\n", hr); @@ -538,6 +552,43 @@ static void test_createbitmapfromsource(void) ok(width == 3, "got %d, expected 3\n", width); ok(height == 3, "got %d, expected 3\n", height); + /* CreateBitmapFromSourceRect */ + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 0, 0, 16, 32, &bitmap); + ok(hr == S_OK, "Failed to create a bitmap, hr %#x.\n", hr); + hr = IWICBitmap_GetSize(bitmap, &width, &height); + ok(hr == S_OK, "Failed to get bitmap size, hr %#x.\n", hr); + ok(width == 3, "Unexpected width %u.\n", width); + ok(height == 3, "Unexpected height %u.\n", height); + IWICBitmap_Release(bitmap); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 0, 0, 1, 1, &bitmap); + ok(hr == S_OK, "Failed to create a bitmap, hr %#x.\n", hr); + hr = IWICBitmap_GetSize(bitmap, &width, &height); + ok(hr == S_OK, "Failed to get bitmap size, hr %#x.\n", hr); + ok(width == 1, "Unexpected width %u.\n", width); + ok(height == 1, "Unexpected height %u.\n", height); + IWICBitmap_Release(bitmap); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 2, 1, 16, 32, &bitmap); + ok(hr == S_OK, "Failed to create a bitmap, hr %#x.\n", hr); + hr = IWICBitmap_GetSize(bitmap, &width, &height); + ok(hr == S_OK, "Failed to get bitmap size, hr %#x.\n", hr); + ok(width == 1, "Unexpected width %u.\n", width); + ok(height == 2, "Unexpected height %u.\n", height); + IWICBitmap_Release(bitmap); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 0, 0, 0, 2, &bitmap); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 0, 0, 2, 0, &bitmap); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 1, 3, 16, 32, &bitmap); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + + hr = IWICImagingFactory_CreateBitmapFromSourceRect(factory, (IWICBitmapSource *)bitmap2, 3, 1, 16, 32, &bitmap); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + IWICBitmap_Release(bitmap2); }
1
0
0
0
Alexandre Julliard : makefiles: Support file-specific IDL flags.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 39b24fa3faf94974eded06b2f14ec36562c8cf60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=39b24fa3faf94974eded06b2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 8 18:54:21 2018 +0100 makefiles: Support file-specific IDL flags. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/makedep.c b/tools/makedep.c index 66b21db..e3bb04a 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2648,6 +2648,7 @@ static void output_source_idl( struct makefile *make, struct incl_file *source, output_filenames( make->define_args ); output_filenames( extradefs ); output_filenames( get_expanded_make_var_array( make, "EXTRAIDLFLAGS" )); + output_filenames( get_expanded_file_local_var( make, obj, "EXTRAIDLFLAGS" )); output_filename( source->filename ); output( "\n" ); output_filenames_obj_dir( make, targets );
1
0
0
0
Zebediah Figura : rpcrt4: Build the typelib stub headers.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: ad3e8134ac66e4b1dae685b974f0b27010432336 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad3e8134ac66e4b1dae685b9…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Nov 3 18:07:16 2018 -0500 rpcrt4: Build the typelib stub headers. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rpcrt4/ndr_typelib.c | 73 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index 25c4183..aa54db2 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -199,35 +199,104 @@ HRESULT WINAPI CreateProxyFromTypeInfo(ITypeInfo *typeinfo, IUnknown *outer, struct typelib_stub { CStdStubBuffer stub; + IID iid; + MIDL_STUB_DESC stub_desc; + MIDL_SERVER_INFO server_info; + CInterfaceStubVtbl stub_vtbl; + unsigned short *offset_table; }; +static ULONG WINAPI typelib_stub_Release(IRpcStubBuffer *iface) +{ + struct typelib_stub *stub = CONTAINING_RECORD(iface, struct typelib_stub, stub); + ULONG refcount = InterlockedDecrement(&stub->stub.RefCount); + + TRACE("(%p) decreasing refs to %d\n", stub, refcount); + + if (!refcount) + { + /* test_Release shows that native doesn't call Disconnect here. + We'll leave it in for the time being. */ + IRpcStubBuffer_Disconnect(iface); + + heap_free((void *)stub->stub_desc.pFormatTypes); + heap_free((void *)stub->server_info.ProcString); + heap_free(stub->offset_table); + heap_free(stub); + } + + return refcount; +} + static HRESULT typelib_stub_init(struct typelib_stub *stub, IUnknown *server, IRpcStubBuffer **stub_buffer) { + HRESULT hr; + + hr = IUnknown_QueryInterface(server, stub->stub_vtbl.header.piid, + (void **)&stub->stub.pvServerObject); + if (FAILED(hr)) + { + WARN("Failed to get interface %s, hr %#x.\n", + debugstr_guid(stub->stub_vtbl.header.piid), hr); + stub->stub.pvServerObject = server; + IUnknown_AddRef(server); + } + + stub->stub.lpVtbl = &stub->stub_vtbl.Vtbl; stub->stub.RefCount = 1; - *stub_buffer = (IRpcStubBuffer *)&stub->stub; - return E_NOTIMPL; + *stub_buffer = (IRpcStubBuffer *)&stub->stub; + return S_OK; } HRESULT WINAPI CreateStubFromTypeInfo(ITypeInfo *typeinfo, REFIID iid, IUnknown *server, IRpcStubBuffer **stub_buffer) { struct typelib_stub *stub; + WORD funcs, parentfuncs; HRESULT hr; TRACE("typeinfo %p, iid %s, server %p, stub_buffer %p.\n", typeinfo, debugstr_guid(iid), server, stub_buffer); + hr = get_iface_info(typeinfo, &funcs, &parentfuncs); + if (FAILED(hr)) + return hr; + if (!(stub = heap_alloc_zero(sizeof(*stub)))) { ERR("Failed to allocate stub object.\n"); return E_OUTOFMEMORY; } + init_stub_desc(&stub->stub_desc); + stub->server_info.pStubDesc = &stub->stub_desc; + + hr = build_format_strings(typeinfo, funcs, &stub->stub_desc.pFormatTypes, + &stub->server_info.ProcString, &stub->offset_table); + if (FAILED(hr)) + { + heap_free(stub); + return hr; + } + stub->server_info.FmtStringOffset = &stub->offset_table[-3]; + + stub->iid = *iid; + stub->stub_vtbl.header.piid = &stub->iid; + stub->stub_vtbl.header.pServerInfo = &stub->server_info; + stub->stub_vtbl.header.DispatchTableCount = funcs + parentfuncs; + stub->stub_vtbl.Vtbl = CStdStubBuffer_Vtbl; + stub->stub_vtbl.Vtbl.Release = typelib_stub_Release; + hr = typelib_stub_init(stub, server, stub_buffer); if (FAILED(hr)) + { + heap_free((void *)stub->stub_desc.pFormatTypes); + heap_free((void *)stub->server_info.ProcString); + heap_free(stub->offset_table); heap_free(stub); + } return hr; }
1
0
0
0
Zebediah Figura : rpcrt4: Build the typelib proxy headers.
by Alexandre Julliard
08 Nov '18
08 Nov '18
Module: wine Branch: master Commit: 297d9cabb832c182f44f0891100cbd962fc9fc4f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=297d9cabb832c182f44f0891…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Nov 3 18:07:15 2018 -0500 rpcrt4: Build the typelib proxy headers. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rpcrt4/cproxy.c | 2 +- dlls/rpcrt4/cpsf.h | 1 + dlls/rpcrt4/ndr_typelib.c | 112 ++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 110 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 6f15ed5..ab24b81 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -197,7 +197,7 @@ static const struct thunk *allocate_block( unsigned int num ) return block; } -static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num ) +BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num ) { const void **entry = (const void **)(vtbl + 1); DWORD i, j; diff --git a/dlls/rpcrt4/cpsf.h b/dlls/rpcrt4/cpsf.h index 0ada0d1..c8980e5 100644 --- a/dlls/rpcrt4/cpsf.h +++ b/dlls/rpcrt4/cpsf.h @@ -61,5 +61,6 @@ extern const IRpcStubBufferVtbl CStdStubBuffer_Delegating_Vtbl DECLSPEC_HIDDEN; BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num) DECLSPEC_HIDDEN; HRESULT create_proxy(REFIID iid, IUnknown *pUnkOuter, IRpcProxyBuffer **pproxy, void **ppv) DECLSPEC_HIDDEN; HRESULT create_stub(REFIID iid, IUnknown *pUnk, IRpcStubBuffer **ppstub) DECLSPEC_HIDDEN; +BOOL fill_stubless_table(IUnknownVtbl *vtbl, DWORD num) DECLSPEC_HIDDEN; #endif /* __WINE_CPSF_H */ diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index c0db6b7..25c4183 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -20,6 +20,7 @@ #define COBJMACROS #include "oaidl.h" +#define USE_STUBLESS_PROXY #include "rpcproxy.h" #include "wine/debug.h" #include "wine/heap.h" @@ -28,9 +29,62 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); +static HRESULT build_format_strings(ITypeInfo *typeinfo, WORD funcs, + const unsigned char **type_ret, const unsigned char **proc_ret, + unsigned short **offset_ret) +{ + return E_NOTIMPL; +} + +/* Common helper for Create{Proxy,Stub}FromTypeInfo(). */ +static HRESULT get_iface_info(ITypeInfo *typeinfo, WORD *funcs, WORD *parentfuncs) +{ + TYPEATTR *typeattr; + ITypeLib *typelib; + TLIBATTR *libattr; + SYSKIND syskind; + HRESULT hr; + + hr = ITypeInfo_GetContainingTypeLib(typeinfo, &typelib, NULL); + if (FAILED(hr)) + return hr; + + hr = ITypeLib_GetLibAttr(typelib, &libattr); + if (FAILED(hr)) + { + ITypeLib_Release(typelib); + return hr; + } + syskind = libattr->syskind; + ITypeLib_ReleaseTLibAttr(typelib, libattr); + ITypeLib_Release(typelib); + + hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); + if (FAILED(hr)) + return hr; + *funcs = typeattr->cFuncs; + *parentfuncs = typeattr->cbSizeVft / (syskind == SYS_WIN64 ? 8 : 4) - *funcs; + ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); + + return S_OK; +} + +static void init_stub_desc(MIDL_STUB_DESC *desc) +{ + desc->pfnAllocate = NdrOleAllocate; + desc->pfnFree = NdrOleFree; + desc->Version = 0x50002; + /* type format string is initialized with proc format string and offset table */ +} + struct typelib_proxy { StdProxyImpl proxy; + IID iid; + MIDL_STUB_DESC stub_desc; + MIDL_STUBLESS_PROXY_INFO proxy_info; + CInterfaceProxyVtbl *proxy_vtbl; + unsigned short *offset_table; }; static ULONG WINAPI typelib_proxy_Release(IRpcProxyBuffer *iface) @@ -42,6 +96,12 @@ static ULONG WINAPI typelib_proxy_Release(IRpcProxyBuffer *iface) if (!refcount) { + if (proxy->proxy.pChannel) + IRpcProxyBuffer_Disconnect(&proxy->proxy.IRpcProxyBuffer_iface); + heap_free((void *)proxy->stub_desc.pFormatTypes); + heap_free((void *)proxy->proxy_info.ProcFormatString); + heap_free(proxy->offset_table); + heap_free(proxy->proxy_vtbl); heap_free(proxy); } return refcount; @@ -57,37 +117,81 @@ static const IRpcProxyBufferVtbl typelib_proxy_vtbl = }; static HRESULT typelib_proxy_init(struct typelib_proxy *proxy, IUnknown *outer, - IRpcProxyBuffer **proxy_buffer, void **out) + ULONG count, IRpcProxyBuffer **proxy_buffer, void **out) { + if (!fill_stubless_table((IUnknownVtbl *)proxy->proxy_vtbl->Vtbl, count)) + return E_OUTOFMEMORY; + if (!outer) outer = (IUnknown *)&proxy->proxy; proxy->proxy.IRpcProxyBuffer_iface.lpVtbl = &typelib_proxy_vtbl; + proxy->proxy.PVtbl = proxy->proxy_vtbl->Vtbl; proxy->proxy.RefCount = 1; + proxy->proxy.piid = proxy->proxy_vtbl->header.piid; proxy->proxy.pUnkOuter = outer; *proxy_buffer = &proxy->proxy.IRpcProxyBuffer_iface; + *out = &proxy->proxy.PVtbl; + IUnknown_AddRef((IUnknown *)*out); - return E_NOTIMPL; + return S_OK; } HRESULT WINAPI CreateProxyFromTypeInfo(ITypeInfo *typeinfo, IUnknown *outer, REFIID iid, IRpcProxyBuffer **proxy_buffer, void **out) { struct typelib_proxy *proxy; + WORD funcs, parentfuncs, i; HRESULT hr; - TRACE("typeinfo %p, outer %p, iid %s, proxy %p, out %p.\n", + TRACE("typeinfo %p, outer %p, iid %s, proxy_buffer %p, out %p.\n", typeinfo, outer, debugstr_guid(iid), proxy_buffer, out); + hr = get_iface_info(typeinfo, &funcs, &parentfuncs); + if (FAILED(hr)) + return hr; + if (!(proxy = heap_alloc_zero(sizeof(*proxy)))) { ERR("Failed to allocate proxy object.\n"); return E_OUTOFMEMORY; } - hr = typelib_proxy_init(proxy, outer, proxy_buffer, out); + init_stub_desc(&proxy->stub_desc); + proxy->proxy_info.pStubDesc = &proxy->stub_desc; + + proxy->proxy_vtbl = heap_alloc_zero(sizeof(proxy->proxy_vtbl->header) + (funcs + parentfuncs) * sizeof(void *)); + if (!proxy->proxy_vtbl) + { + ERR("Failed to allocate proxy vtbl.\n"); + heap_free(proxy); + return E_OUTOFMEMORY; + } + proxy->proxy_vtbl->header.pStublessProxyInfo = &proxy->proxy_info; + proxy->iid = *iid; + proxy->proxy_vtbl->header.piid = &proxy->iid; + for (i = 0; i < funcs; i++) + proxy->proxy_vtbl->Vtbl[3 + i] = (void *)-1; + + hr = build_format_strings(typeinfo, funcs, &proxy->stub_desc.pFormatTypes, + &proxy->proxy_info.ProcFormatString, &proxy->offset_table); + if (FAILED(hr)) + { + heap_free(proxy->proxy_vtbl); + heap_free(proxy); + return hr; + } + proxy->proxy_info.FormatStringOffset = &proxy->offset_table[-3]; + + hr = typelib_proxy_init(proxy, outer, funcs + parentfuncs, proxy_buffer, out); if (FAILED(hr)) + { + heap_free((void *)proxy->stub_desc.pFormatTypes); + heap_free((void *)proxy->proxy_info.ProcFormatString); + heap_free((void *)proxy->offset_table); + heap_free(proxy->proxy_vtbl); heap_free(proxy); + } return hr; }
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
96
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
92
93
94
95
96
Results per page:
10
25
50
100
200