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 2014
----- 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
404 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Move get_dc palette updates to ddraw.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: fd0189bbfa1ccc3832aaf01fb61a15fbc6ee9e5b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd0189bbfa1ccc3832aaf01fb…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu May 15 16:13:31 2014 +0200 wined3d: Move get_dc palette updates to ddraw. --- dlls/ddraw/ddraw_private.h | 7 +++++++ dlls/ddraw/device.c | 5 +---- dlls/ddraw/surface.c | 19 +++++++++++++++++-- dlls/wined3d/palette.c | 6 ++++++ dlls/wined3d/surface.c | 27 +-------------------------- dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 7 files changed, 34 insertions(+), 32 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 2bf8132..8cc5201 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -575,6 +575,13 @@ void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN void multiply_matrix(D3DMATRIX *dst, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN; +static inline BOOL format_is_paletteindexed(const DDPIXELFORMAT *fmt) +{ + DWORD flags = DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4 + | DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8; + return !!(fmt->dwFlags & flags); +} + /* Used for generic dumping */ struct flag_info { diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index e184cfd..4f270fd 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1798,10 +1798,7 @@ static HRESULT WINAPI d3d_device2_GetCurrentViewport(IDirect3DDevice2 *iface, ID static BOOL validate_surface_palette(struct ddraw_surface *surface) { - return !(surface->surface_desc.u4.ddpfPixelFormat.dwFlags - & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 - | DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8 - | DDPF_PALETTEINDEXEDTO8)) + return !format_is_paletteindexed(&surface->surface_desc.u4.ddpfPixelFormat) || surface->palette; } diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 2efc98c..3f230a2 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -461,8 +461,7 @@ static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectD return DDERR_INVALIDSURFACETYPE; } - if (!(surface->surface_desc.u4.ddpfPixelFormat.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 - | DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8))) + if (!format_is_paletteindexed(&surface->surface_desc.u4.ddpfPixelFormat)) return DDERR_INVALIDPIXELFORMAT; wined3d_mutex_lock(); @@ -2017,6 +2016,22 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *hdc) hr = ddraw_surface_update_frontbuffer(surface, NULL, TRUE); if (SUCCEEDED(hr)) hr = wined3d_surface_getdc(surface->wined3d_surface, hdc); + + if (SUCCEEDED(hr) && format_is_paletteindexed(&surface->surface_desc.u4.ddpfPixelFormat)) + { + const struct ddraw_palette *palette; + + if (surface->palette) + palette = surface->palette; + else if (surface->ddraw->primary) + palette = surface->ddraw->primary->palette; + else + palette = NULL; + + if (palette) + wined3d_palette_apply_to_dc(palette->wineD3DPalette, *hdc); + } + wined3d_mutex_unlock(); switch(hr) { diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index e103b5b..24b344c 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -83,6 +83,12 @@ HRESULT CDECL wined3d_palette_get_entries(const struct wined3d_palette *palette, return WINED3D_OK; } +void CDECL wined3d_palette_apply_to_dc(const struct wined3d_palette *palette, HDC dc) +{ + if (SetDIBColorTable(dc, 0, 256, palette->colors) != 256) + ERR("Failed to set DIB color table.\n"); +} + HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index dea27ab..023439d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1378,7 +1378,7 @@ static void gdi_surface_realize_palette(struct wined3d_surface *surface) /* Tell the swapchain to update the screen. */ if (surface->swapchain && surface == surface->swapchain->front_buffer) { - SetDIBColorTable(surface->hDC, 0, 256, palette->colors); + wined3d_palette_apply_to_dc(palette, surface->hDC); x11_copy_to_screen(surface->swapchain, NULL); } } @@ -3122,31 +3122,6 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) surface_load_location(surface, WINED3D_LOCATION_DIB); surface_invalidate_location(surface, ~WINED3D_LOCATION_DIB); - if (surface->resource.format->id == WINED3DFMT_P8_UINT - || surface->resource.format->id == WINED3DFMT_P8_UINT_A8_UNORM) - { - /* GetDC on palettized formats is unsupported in D3D9, and the method - * is missing in D3D8, so this should only be used for DX <=7 - * surfaces (with non-device palettes). */ - const RGBQUAD *colors = NULL; - - if (surface->palette) - { - colors = surface->palette->colors; - } - else - { - struct wined3d_swapchain *swapchain = surface->resource.device->swapchains[0]; - struct wined3d_surface *dds_primary = swapchain->front_buffer; - - if (dds_primary && dds_primary->palette) - colors = dds_primary->palette->colors; - } - - if (colors) - SetDIBColorTable(surface->hDC, 0, 256, colors); - } - surface->flags |= SFLAG_DCINUSE; surface->resource.map_count++; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 41b3158..f1a45dd 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -160,6 +160,7 @@ @ cdecl wined3d_palette_create(ptr long long ptr ptr) @ cdecl wined3d_palette_decref(ptr) @ cdecl wined3d_palette_get_entries(ptr long long long ptr) +@ cdecl wined3d_palette_apply_to_dc(ptr ptr) @ cdecl wined3d_palette_incref(ptr) @ cdecl wined3d_palette_set_entries(ptr long long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index db36fbf..328b595 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2261,6 +2261,7 @@ HRESULT __cdecl wined3d_palette_create(struct wined3d_device *device, DWORD flag ULONG __cdecl wined3d_palette_decref(struct wined3d_palette *palette); HRESULT __cdecl wined3d_palette_get_entries(const struct wined3d_palette *palette, DWORD flags, DWORD start, DWORD count, PALETTEENTRY *entries); +void __cdecl wined3d_palette_apply_to_dc(const struct wined3d_palette *palette, HDC dc); ULONG __cdecl wined3d_palette_incref(struct wined3d_palette *palette); HRESULT __cdecl wined3d_palette_set_entries(struct wined3d_palette *palette, DWORD flags, DWORD start, DWORD count, const PALETTEENTRY *entries);
1
0
0
0
Nikolay Sivov : xmllite/writer: Implement Flush() method.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: caeecfa223013941f44e9974a51f9bb3bd2b2a89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=caeecfa223013941f44e9974a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 15 18:50:31 2014 +0400 xmllite/writer: Implement Flush() method. --- dlls/xmllite/tests/writer.c | 14 +++++++------- dlls/xmllite/writer.c | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 2fcd5f2..b6b8fe3 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -170,24 +170,24 @@ static void test_writestartdocument(void) hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW); ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream); ok(hr == S_OK, "got 0x%08x\n", hr); + /* nothing written yet */ + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXmlWriter_Flush(writer); -todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - if (hr == E_NOTIMPL) - { - IStream_Release(stream); - IXmlWriter_Release(writer); - return; - } hr = GetHGlobalFromStream(stream, &hglobal); ok(hr == S_OK, "got 0x%08x\n", hr); diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 745da79..0a1d361 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -2,6 +2,7 @@ * IXmlWriter implementation * * Copyright 2011 Alistair Leslie-Hughes + * Copyright 2014 Nikolay Sivov for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -62,6 +63,7 @@ typedef struct IMalloc *imalloc; xml_encoding encoding; struct output_buffer buffer; + ULONG stream_written; } xmlwriteroutput; static const struct IUnknownVtbl xmlwriteroutputvtbl; @@ -223,6 +225,11 @@ static HRESULT write_output_buffer_quoted(xmlwriteroutput *output, const WCHAR * return S_OK; } +static inline void reset_output_buffer(xmlwriteroutput *output) +{ + output->stream_written = 0; +} + static void writeroutput_release_stream(xmlwriteroutput *writeroutput) { if (writeroutput->stream) { @@ -243,6 +250,31 @@ static inline HRESULT writeroutput_query_for_stream(xmlwriteroutput *writeroutpu return hr; } +static HRESULT writeroutput_flush_stream(xmlwriteroutput *output) +{ + struct output_buffer *buffer; + ULONG written = 0, len; + HRESULT hr; + + if (!output || !output->stream) + return S_OK; + + buffer = &output->buffer; + + len = buffer->written - output->stream_written; + if (!len) + return S_OK; + + hr = ISequentialStream_Write(output->stream, buffer->data + output->stream_written, len, &written); + if (FAILED(hr)) { + WARN("write to stream failed (0x%08x)\n", hr); + return hr; + } + + output->stream_written += written; + return S_OK; +} + static HRESULT WINAPI xmlwriter_QueryInterface(IXmlWriter *iface, REFIID riid, void **ppvObject) { xmlwriter *This = impl_from_IXmlWriter(iface); @@ -295,6 +327,7 @@ static HRESULT WINAPI xmlwriter_SetOutput(IXmlWriter *iface, IUnknown *output) TRACE("(%p)->(%p)\n", This, output); if (This->output) { + reset_output_buffer(This->output); writeroutput_release_stream(This->output); IUnknown_Release(&This->output->IXmlWriterOutput_iface); This->output = NULL; @@ -662,9 +695,9 @@ static HRESULT WINAPI xmlwriter_Flush(IXmlWriter *iface) { xmlwriter *This = impl_from_IXmlWriter(iface); - FIXME("%p\n", This); + TRACE("%p\n", This); - return E_NOTIMPL; + return writeroutput_flush_stream(This->output); } static const struct IXmlWriterVtbl xmlwriter_vtbl = @@ -825,6 +858,7 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, if (imalloc) IMalloc_AddRef(imalloc); writeroutput->encoding = parse_encoding_name(encoding ? encoding : utf8W, -1); writeroutput->stream = NULL; + writeroutput->stream_written = 0; hr = init_output_buffer(writeroutput); if (FAILED(hr)) { IUnknown_Release(&writeroutput->IXmlWriterOutput_iface);
1
0
0
0
Nikolay Sivov : xmllite/writer: Initial support for starting a document.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: a0f67c36956dd8998a0e79e675fcc7d7151b2dcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0f67c36956dd8998a0e79e67…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 15 18:49:37 2014 +0400 xmllite/writer: Initial support for starting a document. --- dlls/xmllite/reader.c | 13 ++-- dlls/xmllite/tests/writer.c | 20 ++++-- dlls/xmllite/writer.c | 154 +++++++++++++++++++++++++++++++++++++--- dlls/xmllite/xmllite_private.h | 9 +++ 4 files changed, 175 insertions(+), 21 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a0f67c36956dd8998a0e7…
1
0
0
0
Nikolay Sivov : xmllite/writer: Initial support of output buffer creation.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 71ab66efa04f80ef788a485295f10dd9e0d48191 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71ab66efa04f80ef788a48529…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 15 18:47:26 2014 +0400 xmllite/writer: Initial support of output buffer creation. --- dlls/xmllite/reader.c | 2 +- dlls/xmllite/tests/writer.c | 83 ++++++++++++++++++++++++++++++++++++++++ dlls/xmllite/writer.c | 48 +++++++++++++++++++++++ dlls/xmllite/xmllite_private.h | 3 +- 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index d8b81ea..e772a08 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -554,7 +554,7 @@ static void free_encoded_buffer(xmlreaderinput *input, encoded_buffer *buffer) readerinput_free(input, buffer->data); } -static HRESULT get_code_page(xml_encoding encoding, UINT *cp) +HRESULT get_code_page(xml_encoding encoding, UINT *cp) { if (encoding == XmlEncoding_Unknown) { diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 738844f..0f86fb9 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -143,6 +143,88 @@ static void test_writeroutput(void) IUnknown_Release(output); } +static void test_writestartdocument(void) +{ + static const char fullprolog[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"; + static const char prologversion[] = "<?xml version=\"1.0\"?>"; + static const WCHAR versionW[] = {'v','e','r','s','i','o','n','=','"','1','.','0','"',0}; + static const WCHAR xmlW[] = {'x','m','l',0}; + IXmlWriter *writer; + HGLOBAL hglobal; + IStream *stream; + HRESULT hr; + char *ptr; + + hr = pCreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + /* output not set */ + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); +todo_wine + ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); + if (hr == E_NOTIMPL) { + IXmlWriter_Release(writer); + return; + } + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetHGlobalFromStream(stream, &hglobal); + ok(hr == S_OK, "got 0x%08x\n", hr); + + ptr = GlobalLock(hglobal); + ok(!strncmp(ptr, fullprolog, strlen(fullprolog)), "got %s, expected %s\n", ptr, fullprolog); + GlobalUnlock(hglobal); + + /* one more time */ + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); + ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr); + IStream_Release(stream); + + /* now add PI manually, and try to start a document */ + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes); + ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr); + + /* another attempt to add 'xml' PI */ + hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW); + ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetHGlobalFromStream(stream, &hglobal); + ok(hr == S_OK, "got 0x%08x\n", hr); + + ptr = GlobalLock(hglobal); + ok(!strncmp(ptr, prologversion, strlen(prologversion)), "got %s\n", ptr); + GlobalUnlock(hglobal); + + IStream_Release(stream); + IXmlWriter_Release(writer); +} + START_TEST(writer) { if (!init_pointers()) @@ -150,4 +232,5 @@ START_TEST(writer) test_writer_create(); test_writeroutput(); + test_writestartdocument(); } diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 2432602..10d73cb 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -34,6 +34,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(xmllite); /* not defined in public headers */ DEFINE_GUID(IID_IXmlWriterOutput, 0xc1131708, 0x0f59, 0x477f, 0x93, 0x59, 0x7d, 0x33, 0x24, 0x51, 0xbc, 0x1a); +struct output_buffer +{ + char *data; + unsigned int allocated; + unsigned int written; + UINT codepage; +}; + typedef struct { IXmlWriterOutput IXmlWriterOutput_iface; @@ -42,6 +50,7 @@ typedef struct ISequentialStream *stream; IMalloc *imalloc; xml_encoding encoding; + struct output_buffer buffer; } xmlwriteroutput; static const struct IUnknownVtbl xmlwriteroutputvtbl; @@ -107,6 +116,36 @@ static inline void writer_free(xmlwriter *writer, void *mem) m_free(writer->imalloc, mem); } +static HRESULT init_output_buffer(xmlwriteroutput *output) +{ + struct output_buffer *buffer = &output->buffer; + const int initial_len = 0x2000; + HRESULT hr; + UINT cp; + + hr = get_code_page(output->encoding, &cp); + if (FAILED(hr)) return hr; + + buffer->data = writeroutput_alloc(output, initial_len); + if (!buffer->data) return E_OUTOFMEMORY; + + memset(buffer->data, 0, 4); + buffer->allocated = initial_len; + buffer->written = 0; + buffer->codepage = cp; + + return S_OK; +} + +static void free_output_buffer(xmlwriteroutput *output) +{ + struct output_buffer *buffer = &output->buffer; + writeroutput_free(output, buffer->data); + buffer->data = NULL; + buffer->allocated = 0; + buffer->written = 0; +} + static void writeroutput_release_stream(xmlwriteroutput *writeroutput) { if (writeroutput->stream) { @@ -572,6 +611,7 @@ static ULONG WINAPI xmlwriteroutput_Release(IXmlWriterOutput *iface) IMalloc *imalloc = This->imalloc; if (This->output) IUnknown_Release(This->output); if (This->stream) ISequentialStream_Release(This->stream); + free_output_buffer(This); writeroutput_free(This, This); if (imalloc) IMalloc_Release(imalloc); } @@ -627,11 +667,14 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IXmlWriterOutput **output) { xmlwriteroutput *writeroutput; + HRESULT hr; TRACE("%p %p %s %p\n", stream, imalloc, debugstr_w(encoding), output); if (!stream || !output) return E_INVALIDARG; + *output = NULL; + if (imalloc) writeroutput = IMalloc_Alloc(imalloc, sizeof(*writeroutput)); else @@ -644,6 +687,11 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, if (imalloc) IMalloc_AddRef(imalloc); writeroutput->encoding = parse_encoding_name(encoding, -1); writeroutput->stream = NULL; + hr = init_output_buffer(writeroutput); + if (FAILED(hr)) { + IUnknown_Release(&writeroutput->IXmlWriterOutput_iface); + return hr; + } IUnknown_QueryInterface(stream, &IID_IUnknown, (void**)&writeroutput->output); diff --git a/dlls/xmllite/xmllite_private.h b/dlls/xmllite/xmllite_private.h index 96a78fa..642aabe 100644 --- a/dlls/xmllite/xmllite_private.h +++ b/dlls/xmllite/xmllite_private.h @@ -60,6 +60,7 @@ typedef enum XmlEncoding_Unknown } xml_encoding; -xml_encoding parse_encoding_name(const WCHAR *name, int len) DECLSPEC_HIDDEN; +xml_encoding parse_encoding_name(const WCHAR*,int) DECLSPEC_HIDDEN; +HRESULT get_code_page(xml_encoding,UINT*) DECLSPEC_HIDDEN; #endif /* __XMLLITE_PRIVATE__ */
1
0
0
0
Nikolay Sivov : xmllite/reader: Create reader input with same IMalloc as reader.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 0ae578b71cb1319f61415ef5644f2c1fbe8e9159 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ae578b71cb1319f61415ef56…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 14 21:53:55 2014 +0400 xmllite/reader: Create reader input with same IMalloc as reader. --- dlls/xmllite/reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index deb2d2e..d8b81ea 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -2517,7 +2517,7 @@ static HRESULT WINAPI xmlreader_SetInput(IXmlReader* iface, IUnknown *input) { /* create IXmlReaderInput basing on supplied interface */ hr = CreateXmlReaderInputWithEncodingName(input, - NULL, NULL, FALSE, NULL, &readerinput); + This->imalloc, NULL, FALSE, NULL, &readerinput); if (hr != S_OK) return hr; This->input = impl_from_IXmlReaderInput(readerinput); }
1
0
0
0
Jacek Caban : msctf: Added IEnumTfInputProcessorProfiles interface stub implementation.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 645cdf9dc31c226caa3b1cb6b7a8d881979e122d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=645cdf9dc31c226caa3b1cb6b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 15 16:52:30 2014 +0200 msctf: Added IEnumTfInputProcessorProfiles interface stub implementation. --- dlls/msctf/inputprocessor.c | 113 ++++++++++++++++++++++++++++++++++++- dlls/msctf/tests/inputprocessor.c | 11 +++- 2 files changed, 119 insertions(+), 5 deletions(-) diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c index f1595f8..89eb746 100644 --- a/dlls/msctf/inputprocessor.c +++ b/dlls/msctf/inputprocessor.c @@ -97,9 +97,107 @@ typedef struct tagEnumTfLanguageProfiles { ITfCategoryMgr *catmgr; } EnumTfLanguageProfiles; +typedef struct { + IEnumTfInputProcessorProfiles IEnumTfInputProcessorProfiles_iface; + LONG ref; +} EnumTfInputProcessorProfiles; + static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut); static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguageProfiles **ppOut); +static inline EnumTfInputProcessorProfiles *impl_from_IEnumTfInputProcessorProfiles(IEnumTfInputProcessorProfiles *iface) +{ + return CONTAINING_RECORD(iface, EnumTfInputProcessorProfiles, IEnumTfInputProcessorProfiles_iface); +} + +static HRESULT WINAPI EnumTfInputProcessorProfiles_QueryInterface(IEnumTfInputProcessorProfiles *iface, + REFIID riid, void **ppv) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + + if(IsEqualGUID(riid, &IID_IUnknown)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = &This->IEnumTfInputProcessorProfiles_iface; + }else if(IsEqualGUID(riid, &IID_IEnumTfInputProcessorProfiles)) { + TRACE("(%p)->(IID_IEnumTfInputProcessorProfiles %p)\n", This, ppv); + *ppv = &This->IEnumTfInputProcessorProfiles_iface; + }else { + *ppv = NULL; + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI EnumTfInputProcessorProfiles_AddRef(IEnumTfInputProcessorProfiles *iface) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI EnumTfInputProcessorProfiles_Release(IEnumTfInputProcessorProfiles *iface) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI EnumTfInputProcessorProfiles_Clone(IEnumTfInputProcessorProfiles *iface, + IEnumTfInputProcessorProfiles **ret) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + FIXME("(%p)->(%p)\n", This, ret); + return E_NOTIMPL; +} + +static HRESULT WINAPI EnumTfInputProcessorProfiles_Next(IEnumTfInputProcessorProfiles *iface, ULONG count, + TF_INPUTPROCESSORPROFILE *profile, ULONG *fetch) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + + FIXME("(%p)->(%u %p %p)\n", This, count, profile, fetch); + + if(fetch) + *fetch = 0; + return S_FALSE; +} + +static HRESULT WINAPI EnumTfInputProcessorProfiles_Reset(IEnumTfInputProcessorProfiles *iface) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI EnumTfInputProcessorProfiles_Skip(IEnumTfInputProcessorProfiles *iface, ULONG count) +{ + EnumTfInputProcessorProfiles *This = impl_from_IEnumTfInputProcessorProfiles(iface); + FIXME("(%p)->(%u)\n", This, count); + return E_NOTIMPL; +} + +static const IEnumTfInputProcessorProfilesVtbl EnumTfInputProcessorProfilesVtbl = { + EnumTfInputProcessorProfiles_QueryInterface, + EnumTfInputProcessorProfiles_AddRef, + EnumTfInputProcessorProfiles_Release, + EnumTfInputProcessorProfiles_Clone, + EnumTfInputProcessorProfiles_Next, + EnumTfInputProcessorProfiles_Reset, + EnumTfInputProcessorProfiles_Skip +}; + static inline InputProcessorProfiles *impl_from_ITfInputProcessorProfiles(ITfInputProcessorProfiles *iface) { return CONTAINING_RECORD(iface, InputProcessorProfiles, ITfInputProcessorProfiles_iface); @@ -742,8 +840,19 @@ static HRESULT WINAPI InputProcessorProfileMgr_EnumProfiles(ITfInputProcessorPro IEnumTfInputProcessorProfiles **ppEnum) { InputProcessorProfiles *This = impl_from_ITfInputProcessorProfileMgr(iface); - FIXME("(%p)->(%x %p)\n", This, langid, ppEnum); - return E_NOTIMPL; + EnumTfInputProcessorProfiles *enum_profiles; + + TRACE("(%p)->(%x %p)\n", This, langid, ppEnum); + + enum_profiles = HeapAlloc(GetProcessHeap(), 0, sizeof(*enum_profiles)); + if(!enum_profiles) + return E_OUTOFMEMORY; + + enum_profiles->IEnumTfInputProcessorProfiles_iface.lpVtbl = &EnumTfInputProcessorProfilesVtbl; + enum_profiles->ref = 1; + + *ppEnum = &enum_profiles->IEnumTfInputProcessorProfiles_iface; + return S_OK; } static HRESULT WINAPI InputProcessorProfileMgr_ReleaseInputProcessor(ITfInputProcessorProfileMgr *iface, REFCLSID rclsid, diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c index f457dbb..8a052b3 100644 --- a/dlls/msctf/tests/inputprocessor.c +++ b/dlls/msctf/tests/inputprocessor.c @@ -2186,15 +2186,20 @@ static void test_AssociateFocus(void) sink_check_ok(&test_OnPopContext,"OnPopContext"); } -static void test_QI(void) +static void test_profile_mgr(void) { + IEnumTfInputProcessorProfiles *enum_profiles; ITfInputProcessorProfileMgr *ipp_mgr; HRESULT hres; - /* A trivial test, probably worth moving once more will be added. */ hres = ITfInputProcessorProfiles_QueryInterface(g_ipp, &IID_ITfInputProcessorProfileMgr, (void**)&ipp_mgr); ok(hres == S_OK, "Could not get ITfInputProcessorProfileMgr iface: %08x\n", hres); + hres = ITfInputProcessorProfileMgr_EnumProfiles(ipp_mgr, 0, &enum_profiles); + ok(hres == S_OK, "EnumProfiles failed: %08x\n", hres); + + IEnumTfInputProcessorProfiles_Release(enum_profiles); + ITfInputProcessorProfileMgr_Release(ipp_mgr); } @@ -2224,7 +2229,7 @@ START_TEST(inputprocessor) test_ThreadMgrUnadviseSinks(); test_UnregisterCategory(); test_Unregister(); - test_QI(); + test_profile_mgr(); } else skip("Unable to create InputProcessor\n");
1
0
0
0
Martin Storsjo : ntdll: Align FILE_*_DIRECTORY_INFORMATION structs to 8 bytes.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 8cb42d41351377415749008de2b6f00593309b54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8cb42d41351377415749008de…
Author: Martin Storsjo <martin(a)martin.st> Date: Thu May 15 15:25:05 2014 +0300 ntdll: Align FILE_*_DIRECTORY_INFORMATION structs to 8 bytes. --- dlls/ntdll/directory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 50bf66a..04a5b75 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -228,15 +228,15 @@ static inline unsigned int dir_info_size( FILE_INFORMATION_CLASS class, unsigned switch (class) { case FileDirectoryInformation: - return (FIELD_OFFSET( FILE_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3; + return (FIELD_OFFSET( FILE_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7; case FileBothDirectoryInformation: - return (FIELD_OFFSET( FILE_BOTH_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3; + return (FIELD_OFFSET( FILE_BOTH_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7; case FileFullDirectoryInformation: - return (FIELD_OFFSET( FILE_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3; + return (FIELD_OFFSET( FILE_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7; case FileIdBothDirectoryInformation: - return (FIELD_OFFSET( FILE_ID_BOTH_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3; + return (FIELD_OFFSET( FILE_ID_BOTH_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7; case FileIdFullDirectoryInformation: - return (FIELD_OFFSET( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3; + return (FIELD_OFFSET( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7; default: assert(0); return 0;
1
0
0
0
Martin Storsjo : ntdll: Don' t write uninitialized bytes at the end of filenames.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 114444ca9cc1f855febfd6ae9c28cc8b69172f31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=114444ca9cc1f855febfd6ae9…
Author: Martin Storsjo <martin(a)martin.st> Date: Thu May 15 15:25:04 2014 +0300 ntdll: Don't write uninitialized bytes at the end of filenames. --- dlls/ntdll/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 890fb71..50bf66a 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1484,7 +1484,7 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK assert(0); return NULL; } - memcpy( filename, long_nameW, total_len - ((char *)filename - (char *)info) ); + memcpy( filename, long_nameW, long_len * sizeof(WCHAR) ); io->Information += total_len; return info; }
1
0
0
0
Jacek Caban : oleaut32: Use debugstr_variant in variant.c where appropriate.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: 9677454f7d80483be6e6d8297d9f01f99d70217e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9677454f7d80483be6e6d8297…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 15 14:55:36 2014 +0200 oleaut32: Use debugstr_variant in variant.c where appropriate. --- dlls/oleaut32/variant.c | 110 ++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 72 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9677454f7d80483be6e6d…
1
0
0
0
Huw Davies : wininet/tests: Don't test GetLastError() on success.
by Alexandre Julliard
15 May '14
15 May '14
Module: wine Branch: master Commit: fec1ed454ce4ccc136c66511404975b9fcb1d503 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fec1ed454ce4ccc136c665114…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu May 15 14:06:05 2014 +0100 wininet/tests: Don't test GetLastError() on success. --- dlls/wininet/tests/url.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c index e1f8612..3e9a1d4 100644 --- a/dlls/wininet/tests/url.c +++ b/dlls/wininet/tests/url.c @@ -851,12 +851,9 @@ static void InternetCreateUrlA_test(void) /* alloc-ed szUrl, NULL lpszScheme * shows that it uses nScheme instead */ - SetLastError(0xdeadbeef); urlComp.lpszScheme = NULL; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL1), "Expected %s, got %s\n", CREATE_URL1, szUrl); @@ -864,48 +861,36 @@ static void InternetCreateUrlA_test(void) * any nScheme out of range seems ignored */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.nScheme = -3; len++; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); /* test valid lpUrlComponents, alloc-ed szUrl */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); len = 51; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); ok(strstr(szUrl, "80") == NULL, "Didn't expect to find 80 in szUrl\n"); ok(!strcmp(szUrl, CREATE_URL1), "Expected %s, got %s\n", CREATE_URL1, szUrl); /* valid username, NULL password */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.lpszPassword = NULL; len = 42; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 41, "Expected len 41, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL2), "Expected %s, got %s\n", CREATE_URL2, szUrl); /* valid username, empty password */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.lpszPassword = empty; len = 51; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL3), "Expected %s, got %s\n", CREATE_URL3, szUrl); @@ -927,39 +912,30 @@ static void InternetCreateUrlA_test(void) * if password is provided, username has to exist */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.lpszUserName = empty; len = 51; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL5), "Expected %s, got %s\n", CREATE_URL5, szUrl); /* NULL username, NULL password */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.lpszUserName = NULL; urlComp.lpszPassword = NULL; len = 42; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 32, "Expected len 32, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL4), "Expected %s, got %s\n", CREATE_URL4, szUrl); /* empty username, empty password */ fill_url_components(&urlComp); - SetLastError(0xdeadbeef); urlComp.lpszUserName = empty; urlComp.lpszPassword = empty; len = 51; ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len); ok(ret, "Expected success\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(len == 50, "Expected len 50, got %d\n", len); ok(!strcmp(szUrl, CREATE_URL5), "Expected %s, got %s\n", CREATE_URL5, szUrl);
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
41
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
Results per page:
10
25
50
100
200