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
October 2016
----- 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
451 discussions
Start a n
N
ew thread
Hans Leidekker : webservices: Add a stub implementation of WS_TYPE_ATTRIBUTE_FIELD_MAPPING in the reader.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 02ee6bda54e462c8fff4a1dc93b8cde2e68630f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02ee6bda54e462c8fff4a1dc9…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 13:03:21 2016 +0200 webservices: Add a stub implementation of WS_TYPE_ATTRIBUTE_FIELD_MAPPING in the reader. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/reader.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 7996cbe..169a0e1 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -3791,6 +3791,9 @@ ULONG get_type_size( WS_TYPE type, const WS_STRUCT_DESCRIPTION *desc ) case WS_STRUCT_TYPE: return desc->size; + case WS_DESCRIPTION_TYPE: + return sizeof(WS_STRUCT_DESCRIPTION *); + default: ERR( "unhandled type %u\n", type ); return 0; @@ -3829,6 +3832,7 @@ static WS_READ_OPTION get_field_read_option( WS_TYPE type, ULONG options ) return WS_READ_REQUIRED_VALUE; case WS_WSZ_TYPE: + case WS_DESCRIPTION_TYPE: if (options & WS_FIELD_NILLABLE) return WS_READ_NILLABLE_POINTER; if (options & WS_FIELD_OPTIONAL) return WS_READ_OPTIONAL_POINTER; return WS_READ_REQUIRED_POINTER; @@ -3940,6 +3944,10 @@ static HRESULT read_type_struct_field( struct reader *reader, const WS_FIELD_DES ptr = buf + desc->offset; switch (desc->mapping) { + case WS_TYPE_ATTRIBUTE_FIELD_MAPPING: + FIXME( "WS_TYPE_ATTRIBUTE_FIELD_MAPPING not supported\n" ); + return S_OK; + case WS_ATTRIBUTE_FIELD_MAPPING: hr = read_type( reader, WS_ATTRIBUTE_TYPE_MAPPING, desc->type, desc->localName, desc->ns, desc->typeDescription, option, heap, ptr, size );
1
0
0
0
Hans Leidekker : webservices: Implement WsReadChars.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: cbc5193e0e8df012176d30e886844e67febd1b88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbc5193e0e8df012176d30e88…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 13:03:20 2016 +0200 webservices: Implement WsReadChars. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/reader.c | 45 ++++++++++++++ dlls/webservices/tests/reader.c | 121 ++++++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- 3 files changed, 167 insertions(+), 1 deletion(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 44f8402..7996cbe 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -4583,6 +4583,51 @@ HRESULT WINAPI WsReadBytes( WS_XML_READER *handle, void *bytes, ULONG max_count, return S_OK; } +static HRESULT utf8_to_utf16( const WS_XML_UTF8_TEXT *utf8, WS_XML_UTF16_TEXT *utf16 ) +{ + int len = MultiByteToWideChar( CP_UTF8, 0, (char *)utf8->value.bytes, utf8->value.length, NULL, 0 ); + if (!(utf16->bytes = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY; + MultiByteToWideChar( CP_UTF8, 0, (char *)utf8->value.bytes, utf8->value.length, (WCHAR *)utf16->bytes, len ); + utf16->byteCount = len * sizeof(WCHAR); + return S_OK; +} + +/************************************************************************** + * WsReadChars [webservices.@] + */ +HRESULT WINAPI WsReadChars( WS_XML_READER *handle, WCHAR *chars, ULONG max_count, ULONG *count, WS_ERROR *error ) +{ + struct reader *reader = (struct reader *)handle; + + TRACE( "%p %p %u %p %p\n", handle, chars, max_count, count, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!reader) return E_INVALIDARG; + if (!reader->input_type) return WS_E_INVALID_OPERATION; + if (!count) return E_INVALIDARG; + + *count = 0; + if (node_type( reader->current ) == WS_XML_NODE_TYPE_TEXT && chars) + { + const WS_XML_TEXT_NODE *text = (const WS_XML_TEXT_NODE *)reader->current; + WS_XML_UTF16_TEXT utf16; + HRESULT hr; + + if ((hr = utf8_to_utf16( (const WS_XML_UTF8_TEXT *)text->text, &utf16 )) != S_OK) return hr; + if (reader->text_conv_offset == utf16.byteCount / sizeof(WCHAR)) + { + heap_free( utf16.bytes ); + return read_node( reader ); + } + *count = min( utf16.byteCount / sizeof(WCHAR) - reader->text_conv_offset, max_count ); + memcpy( chars, utf16.bytes + reader->text_conv_offset * sizeof(WCHAR), *count * sizeof(WCHAR) ); + reader->text_conv_offset += *count; + heap_free( utf16.bytes ); + } + + return S_OK; +} + /************************************************************************** * WsReadCharsUtf8 [webservices.@] */ diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c index 330eb00..23c3f10 100644 --- a/dlls/webservices/tests/reader.c +++ b/dlls/webservices/tests/reader.c @@ -3978,6 +3978,126 @@ static void test_WsReadBytes(void) WsFreeReader( reader ); } +static void test_WsReadChars(void) +{ + static const WCHAR textW[] = {'t','e','x','t'}; + HRESULT hr; + WS_XML_READER *reader; + const WS_XML_NODE *node; + const WS_XML_TEXT_NODE *text; + const WS_XML_UTF8_TEXT *utf8; + unsigned char buf[4]; + WCHAR bufW[4]; + ULONG count; + + hr = WsCreateReader( NULL, 0, &reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadChars( NULL, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = WsReadChars( reader, NULL, 0, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadChars( reader, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadChars( reader, bufW, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadChars( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + count = 0xdeadbeef; + hr = WsReadChars( reader, NULL, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadChars( reader, bufW, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadChars( reader, bufW, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadChars( reader, bufW, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadStartElement( reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadChars( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadChars( reader, bufW, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( bufW, textW, 2 * sizeof(WCHAR) ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + utf8 = (const WS_XML_UTF8_TEXT *)text->text; + ok( text->text->textType == WS_XML_TEXT_TYPE_UTF8, "got %u\n", text->text->textType ); + ok( utf8->value.length == 4, "got %u\n", utf8->value.length ); + ok( !memcmp( utf8->value.bytes, "text", 4 ), "wrong data\n" ); + + /* continue reading in a different encoding */ + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( buf, "xt", 2 ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_END_ELEMENT, "got %u\n", text->node.nodeType ); + + WsFreeReader( reader ); +} + static void test_WsReadCharsUtf8(void) { HRESULT hr; @@ -4132,5 +4252,6 @@ START_TEST(reader) test_entities(); test_field_options(); test_WsReadBytes(); + test_WsReadChars(); test_WsReadCharsUtf8(); } diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index e785497..074f612 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -105,7 +105,7 @@ @ stub WsReadAttribute @ stdcall WsReadBody(ptr ptr long ptr ptr long ptr) @ stdcall WsReadBytes(ptr ptr long ptr ptr) -@ stub WsReadChars +@ stdcall WsReadChars(ptr ptr long ptr ptr) @ stdcall WsReadCharsUtf8(ptr ptr long ptr ptr) @ stdcall WsReadElement(ptr ptr long ptr ptr long ptr) @ stdcall WsReadEndAttribute(ptr ptr)
1
0
0
0
Hans Leidekker : webservices: Implement WsReadCharsUtf8.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: ec30db2e01c029b543acd16b3093c93a22886d24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec30db2e01c029b543acd16b3…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 13:03:19 2016 +0200 webservices: Implement WsReadCharsUtf8. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/reader.c | 29 ++++++++++ dlls/webservices/tests/reader.c | 118 ++++++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- 3 files changed, 148 insertions(+), 1 deletion(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 9a3c7d7..44f8402 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -4582,3 +4582,32 @@ HRESULT WINAPI WsReadBytes( WS_XML_READER *handle, void *bytes, ULONG max_count, return S_OK; } + +/************************************************************************** + * WsReadCharsUtf8 [webservices.@] + */ +HRESULT WINAPI WsReadCharsUtf8( WS_XML_READER *handle, BYTE *bytes, ULONG max_count, ULONG *count, WS_ERROR *error ) +{ + struct reader *reader = (struct reader *)handle; + + TRACE( "%p %p %u %p %p\n", handle, bytes, max_count, count, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!reader) return E_INVALIDARG; + if (!reader->input_type) return WS_E_INVALID_OPERATION; + if (!count) return E_INVALIDARG; + + *count = 0; + if (node_type( reader->current ) == WS_XML_NODE_TYPE_TEXT && bytes) + { + const WS_XML_TEXT_NODE *text = (const WS_XML_TEXT_NODE *)reader->current; + const WS_XML_UTF8_TEXT *utf8 = (const WS_XML_UTF8_TEXT *)text->text; + + if (reader->text_conv_offset == utf8->value.length) return read_node( reader ); + *count = min( utf8->value.length - reader->text_conv_offset, max_count ); + memcpy( bytes, utf8->value.bytes + reader->text_conv_offset, *count ); + reader->text_conv_offset += *count; + } + + return S_OK; +} diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c index c804105..330eb00 100644 --- a/dlls/webservices/tests/reader.c +++ b/dlls/webservices/tests/reader.c @@ -3978,6 +3978,123 @@ static void test_WsReadBytes(void) WsFreeReader( reader ); } +static void test_WsReadCharsUtf8(void) +{ + HRESULT hr; + WS_XML_READER *reader; + const WS_XML_NODE *node; + const WS_XML_TEXT_NODE *text; + const WS_XML_UTF8_TEXT *utf8; + BYTE buf[4]; + ULONG count; + + hr = WsCreateReader( NULL, 0, &reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadCharsUtf8( NULL, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = WsReadCharsUtf8( reader, NULL, 0, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadCharsUtf8( reader, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadCharsUtf8( reader, buf, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>text</t>", sizeof("<t>text</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, NULL, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadStartElement( reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( buf, "te", 2 ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + utf8 = (const WS_XML_UTF8_TEXT *)text->text; + ok( text->text->textType == WS_XML_TEXT_TYPE_UTF8, "got %u\n", text->text->textType ); + ok( utf8->value.length == 4, "got %u\n", utf8->value.length ); + ok( !memcmp( utf8->value.bytes, "text", 4 ), "wrong data\n" ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( buf, "xt", 2 ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + + count = 0xdeadbeef; + hr = WsReadCharsUtf8( reader, buf, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_END_ELEMENT, "got %u\n", text->node.nodeType ); + + WsFreeReader( reader ); +} + START_TEST(reader) { test_WsCreateError(); @@ -4015,4 +4132,5 @@ START_TEST(reader) test_entities(); test_field_options(); test_WsReadBytes(); + test_WsReadCharsUtf8(); } diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 26db0b2..e785497 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -106,7 +106,7 @@ @ stdcall WsReadBody(ptr ptr long ptr ptr long ptr) @ stdcall WsReadBytes(ptr ptr long ptr ptr) @ stub WsReadChars -@ stub WsReadCharsUtf8 +@ stdcall WsReadCharsUtf8(ptr ptr long ptr ptr) @ stdcall WsReadElement(ptr ptr long ptr ptr long ptr) @ stdcall WsReadEndAttribute(ptr ptr) @ stdcall WsReadEndElement(ptr ptr)
1
0
0
0
Hans Leidekker : webservices: Implement WsReadBytes.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 4951f5468c2e4abab94a5492742fb1d5fcc83fae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4951f5468c2e4abab94a54927…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 13:03:18 2016 +0200 webservices: Implement WsReadBytes. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/reader.c | 46 +++++++++++++++ dlls/webservices/tests/reader.c | 118 ++++++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- include/webservices.h | 3 + 4 files changed, 168 insertions(+), 1 deletion(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 9ba4dfc..9a3c7d7 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -590,6 +590,7 @@ struct reader struct xmlbuf *input_buf; const unsigned char *input_data; ULONG input_size; + ULONG text_conv_offset; ULONG prop_count; struct prop prop[sizeof(reader_props)/sizeof(reader_props[0])]; }; @@ -1540,6 +1541,7 @@ static HRESULT read_text( struct reader *reader ) read_insert_node( reader, parent, node ); reader->state = READER_STATE_TEXT; + reader->text_conv_offset = 0; return S_OK; } @@ -4536,3 +4538,47 @@ HRESULT WINAPI WsSetReaderPosition( WS_XML_READER *handle, const WS_XML_NODE_POS reader->current = pos->node; return S_OK; } + +static HRESULT utf8_to_base64( const WS_XML_UTF8_TEXT *utf8, WS_XML_BASE64_TEXT *base64 ) +{ + if (utf8->value.length % 4) return WS_E_INVALID_FORMAT; + if (!(base64->bytes = heap_alloc( utf8->value.length * 3 / 4 ))) return E_OUTOFMEMORY; + base64->length = decode_base64( utf8->value.bytes, utf8->value.length, base64->bytes ); + return S_OK; +} + +/************************************************************************** + * WsReadBytes [webservices.@] + */ +HRESULT WINAPI WsReadBytes( WS_XML_READER *handle, void *bytes, ULONG max_count, ULONG *count, WS_ERROR *error ) +{ + struct reader *reader = (struct reader *)handle; + HRESULT hr; + + TRACE( "%p %p %u %p %p\n", handle, bytes, max_count, count, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + if (!reader) return E_INVALIDARG; + if (!reader->input_type) return WS_E_INVALID_OPERATION; + if (!count) return E_INVALIDARG; + + *count = 0; + if (node_type( reader->current ) == WS_XML_NODE_TYPE_TEXT && bytes) + { + const WS_XML_TEXT_NODE *text = (const WS_XML_TEXT_NODE *)reader->current; + WS_XML_BASE64_TEXT base64; + + if ((hr = utf8_to_base64( (const WS_XML_UTF8_TEXT *)text->text, &base64 )) != S_OK) return hr; + if (reader->text_conv_offset == base64.length) + { + heap_free( base64.bytes ); + return read_node( reader ); + } + *count = min( base64.length - reader->text_conv_offset, max_count ); + memcpy( bytes, base64.bytes + reader->text_conv_offset, *count ); + reader->text_conv_offset += *count; + heap_free( base64.bytes ); + } + + return S_OK; +} diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c index 62ed499..c804105 100644 --- a/dlls/webservices/tests/reader.c +++ b/dlls/webservices/tests/reader.c @@ -3861,6 +3861,123 @@ static void test_field_options(void) WsFreeHeap( heap ); } +static void test_WsReadBytes(void) +{ + HRESULT hr; + WS_XML_READER *reader; + const WS_XML_NODE *node; + const WS_XML_TEXT_NODE *text; + const WS_XML_UTF8_TEXT *utf8; + BYTE buf[4]; + ULONG count; + + hr = WsCreateReader( NULL, 0, &reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadBytes( NULL, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = WsReadBytes( reader, NULL, 0, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + + hr = set_input( reader, "<t>dGV4dA==</t>", sizeof("<t>dGV4dA==</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadBytes( reader, NULL, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>dGV4dA==</t>", sizeof("<t>dGV4dA==</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsReadBytes( reader, buf, 0, NULL, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + hr = set_input( reader, "<t>dGV4dA==</t>", sizeof("<t>dGV4dA==</t>") - 1 ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadBytes( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + count = 0xdeadbeef; + hr = WsReadBytes( reader, NULL, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadToStartElement( reader, NULL, NULL, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + ok( !buf[0], "wrong data\n" ); + + hr = WsReadStartElement( reader, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + count = 0xdeadbeef; + hr = WsReadBytes( reader, NULL, 0, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( buf, "te", 2 ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + utf8 = (const WS_XML_UTF8_TEXT *)text->text; + ok( text->text->textType == WS_XML_TEXT_TYPE_UTF8, "got %u\n", text->text->textType ); + ok( utf8->value.length == 8, "got %u\n", utf8->value.length ); + ok( !memcmp( utf8->value.bytes, "dGV4dA==", 8 ), "wrong data\n" ); + + buf[0] = 0; + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 2, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( count == 2, "got %u\n", count ); + ok( !memcmp( buf, "xt", 2 ), "wrong data\n" ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_TEXT, "got %u\n", text->node.nodeType ); + + count = 0xdeadbeef; + hr = WsReadBytes( reader, buf, 1, &count, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + hr = WsGetReaderNode( reader, &node, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + text = (const WS_XML_TEXT_NODE *)node; + ok( text->node.nodeType == WS_XML_NODE_TYPE_END_ELEMENT, "got %u\n", text->node.nodeType ); + + WsFreeReader( reader ); +} + START_TEST(reader) { test_WsCreateError(); @@ -3897,4 +4014,5 @@ START_TEST(reader) test_WsSetReaderPosition(); test_entities(); test_field_options(); + test_WsReadBytes(); } diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index a03b7bd..26db0b2 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -104,7 +104,7 @@ @ stub WsReadArray @ stub WsReadAttribute @ stdcall WsReadBody(ptr ptr long ptr ptr long ptr) -@ stub WsReadBytes +@ stdcall WsReadBytes(ptr ptr long ptr ptr) @ stub WsReadChars @ stub WsReadCharsUtf8 @ stdcall WsReadElement(ptr ptr long ptr ptr long ptr) diff --git a/include/webservices.h b/include/webservices.h index f1d34c4..3274082 100644 --- a/include/webservices.h +++ b/include/webservices.h @@ -1461,6 +1461,9 @@ HRESULT WINAPI WsReadAttribute(WS_XML_READER*, const WS_ATTRIBUTE_DESCRIPTION*, WS_HEAP*, void*, ULONG, WS_ERROR*); HRESULT WINAPI WsReadBody(WS_MESSAGE*, const WS_ELEMENT_DESCRIPTION*, WS_READ_OPTION, WS_HEAP*, void*, ULONG, WS_ERROR*); +HRESULT WINAPI WsReadBytes(WS_XML_READER*, void*, ULONG, ULONG*, WS_ERROR*); +HRESULT WINAPI WsReadChars(WS_XML_READER*, WCHAR*, ULONG, ULONG*, WS_ERROR*); +HRESULT WINAPI WsReadCharsUtf8(WS_XML_READER*, BYTE*, ULONG, ULONG*, WS_ERROR*); HRESULT WINAPI WsReadElement(WS_XML_READER*, const WS_ELEMENT_DESCRIPTION*, WS_READ_OPTION, WS_HEAP*, void*, ULONG, WS_ERROR*); HRESULT WINAPI WsReadEndAttribute(WS_XML_READER*, WS_ERROR*);
1
0
0
0
Hugh McMaster : regedit: Close the registry key handle in the read function instead of the parser.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: c39ee374a775c19d1f48fa7b0e52b52014f92f5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c39ee374a775c19d1f48fa7b0…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Oct 25 10:21:32 2016 +0000 regedit: Close the registry key handle in the read function instead of the parser. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 7f1475e..5e4c2d2 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -584,15 +584,6 @@ static void processSetValue(WCHAR* line, BOOL is_unicode) */ static void processRegEntry(WCHAR* stdInput, BOOL isUnicode) { - /* - * We encountered the end of the file, make sure we - * close the opened key and exit - */ - if (stdInput == NULL) { - closeKey(); - return; - } - if ( stdInput[0] == '[') /* We are reading a new key */ { WCHAR* keyEnd; @@ -735,7 +726,7 @@ static void processRegLinesA(FILE *in, char* first_chars) line = s_eol + 1; } } - processRegEntry(NULL, FALSE); + closeKey(); HeapFree(GetProcessHeap(), 0, buf); } @@ -851,7 +842,7 @@ static void processRegLinesW(FILE *in) } } - processRegEntry(NULL, TRUE); + closeKey(); HeapFree(GetProcessHeap(), 0, buf); }
1
0
0
0
Hugh McMaster : regedit: Do not close the registy key handle when a line break is encountered.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 93f795950d3af3cedb902e7de0ed7617a0101d9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93f795950d3af3cedb902e7de…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Oct 25 10:21:19 2016 +0000 regedit: Do not close the registy key handle when a line break is encountered. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/regproc.c | 6 ------ programs/regedit/tests/regedit.c | 18 +++++++----------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 7c5105f..7f1475e 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -614,12 +614,6 @@ static void processRegEntry(WCHAR* stdInput, BOOL isUnicode) ( stdInput[0] == '\"'))) /* reading a new value=data pair */ { processSetValue(stdInput, isUnicode); - } else - { - /* Since we are assuming that the file format is valid we must be - * reading a blank line which indicates the end of this key processing - */ - closeKey(); } } diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index 9692c06..efd7715 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -243,9 +243,9 @@ static void test_basic_import(void) "\"Line3\"=\"Value3\"\n\n\n\n" "\"Line4\"=\"Value4\"\n\n"); verify_reg(hkey, "Line1", REG_SZ, "Value1", 7, 0); - todo_wine verify_reg(hkey, "Line2", REG_SZ, "Value2", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); - todo_wine verify_reg(hkey, "Line3", REG_SZ, "Value3", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); - todo_wine verify_reg(hkey, "Line4", REG_SZ, "Value4", 7, TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + verify_reg(hkey, "Line2", REG_SZ, "Value2", 7, 0); + verify_reg(hkey, "Line3", REG_SZ, "Value3", 7, 0); + verify_reg(hkey, "Line4", REG_SZ, "Value4", 7, 0); exec_import_str("REGEDIT4\n\n" "[HKEY_CURRENT_USER\\" KEY_BASE "]\n" @@ -259,15 +259,11 @@ static void test_basic_import(void) "\"Wine4\"=dword:12345678\n\n"); dword = 0x782; verify_reg(hkey, "Wine1", REG_DWORD, &dword, sizeof(dword), 0); - todo_wine verify_reg(hkey, "Wine2", REG_SZ, "Test Value", 11, - TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); - todo_wine verify_reg(hkey, "Wine3", REG_MULTI_SZ, "Line concatenation\0", 20, - TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); - todo_wine verify_reg(hkey, "", REG_SZ, "Test", 5, - TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + verify_reg(hkey, "Wine2", REG_SZ, "Test Value", 11, 0); + verify_reg(hkey, "Wine3", REG_MULTI_SZ, "Line concatenation\0", 20, 0); + verify_reg(hkey, "", REG_SZ, "Test", 5, 0); dword = 0x12345678; - todo_wine verify_reg(hkey, "Wine4", REG_DWORD, &dword, sizeof(dword), - TODO_REG_TYPE|TODO_REG_SIZE|TODO_REG_DATA); + verify_reg(hkey, "Wine4", REG_DWORD, &dword, sizeof(dword), 0); RegCloseKey(hkey);
1
0
0
0
Hans Leidekker : msi: Accept descriptors without component.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: cfb10615e177f2d98984bd4683e4c71dbced4fc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cfb10615e177f2d98984bd468…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Oct 25 09:11:47 2016 +0200 msi: Accept descriptors without component. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/registry.c | 37 +++++++++++++++++++++++-------------- dlls/msi/tests/db.c | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index f3b1ddf..8e6f0a1 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -1024,7 +1024,8 @@ UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode) * * Decomposes an MSI descriptor into product, feature and component parts. * An MSI descriptor is a string of the form: - * [base 85 guid] [feature code] '>' [base 85 guid] + * [base 85 guid] [feature code] '>' [base 85 guid] or + * [base 85 guid] [feature code] '<' * * PARAMS * szDescriptor [I] the descriptor to decompose @@ -1041,21 +1042,21 @@ UINT MSIREG_DeleteClassesUpgradeCodesKey(LPCWSTR szUpgradeCode) UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct, LPWSTR szFeature, LPWSTR szComponent, LPDWORD pUsed ) { - UINT r, len; - LPWSTR p; + UINT len; + const WCHAR *p; GUID product, component; TRACE("%s %p %p %p %p\n", debugstr_w(szDescriptor), szProduct, szFeature, szComponent, pUsed); - r = decode_base85_guid( szDescriptor, &product ); - if( !r ) + if (!decode_base85_guid( szDescriptor, &product )) return ERROR_INVALID_PARAMETER; TRACE("product %s\n", debugstr_guid( &product )); - p = strchrW(&szDescriptor[20],'>'); - if( !p ) + if (!(p = strchrW( &szDescriptor[20], '>' ))) + p = strchrW( &szDescriptor[20], '<' ); + if (!p) return ERROR_INVALID_PARAMETER; len = (p - &szDescriptor[20]); @@ -1064,22 +1065,30 @@ UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct, TRACE("feature %s\n", debugstr_wn( &szDescriptor[20], len )); - r = decode_base85_guid( p+1, &component ); - if( !r ) - return ERROR_INVALID_PARAMETER; - - TRACE("component %s\n", debugstr_guid( &component )); + if (*p == '>') + { + if (!decode_base85_guid( p+1, &component )) + return ERROR_INVALID_PARAMETER; + TRACE( "component %s\n", debugstr_guid(&component) ); + } if (szProduct) StringFromGUID2( &product, szProduct, MAX_FEATURE_CHARS+1 ); if (szComponent) - StringFromGUID2( &component, szComponent, MAX_FEATURE_CHARS+1 ); + { + if (*p == '>') + StringFromGUID2( &component, szComponent, MAX_FEATURE_CHARS+1 ); + else + szComponent[0] = 0; + } if (szFeature) { memcpy( szFeature, &szDescriptor[20], len*sizeof(WCHAR) ); szFeature[len] = 0; } - len = ( &p[21] - szDescriptor ); + + len = p - szDescriptor + 1; + if (*p == '>') len += 20; TRACE("length = %d\n", len); if (pUsed) *pUsed = len; diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 9c1fcba..278b45f 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -470,6 +470,7 @@ static void test_msidecomposedesc(void) /* test a valid feature descriptor */ desc = "']gAVn-}f(ZXfeAR6.jiFollowTheWhiteRabbit>3w2x^IGfe?CxI5heAvk."; len = 0; + prod[0] = feature[0] = comp[0] = 0; r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); ok(r == ERROR_SUCCESS, "returned an error\n"); ok(len == strlen(desc), "length was wrong\n"); @@ -485,6 +486,28 @@ static void test_msidecomposedesc(void) r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); ok(r == ERROR_INVALID_PARAMETER, "returned wrong error\n"); + /* test a feature descriptor with < instead of > */ + desc = "']gAVn-}f(ZXfeAR6.jiFollowTheWhiteRabbit<3w2x^IGfe?CxI5heAvk."; + len = 0; + prod[0] = feature[0] = 0; + comp[0] = 0x55; + r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); + ok(r == ERROR_SUCCESS, "returned an error\n"); + ok(len == 41, "got %u\n", len); + ok(!strcmp(prod,"{90110409-6000-11D3-8CFE-0150048383C9}"), "got '%s'\n", prod); + ok(!strcmp(feature,"FollowTheWhiteRabbit"), "got '%s'\n", feature); + ok(!comp[0], "got '%s'\n", comp); + + len = 0; + prod[0] = feature[0] = 0; + comp[0] = 0x55; + r = pMsiDecomposeDescriptorA("yh1BVN)8A$!!!!!MKKSkAlwaysInstalledIntl_1033<", prod, feature, comp, &len); + ok(r == ERROR_SUCCESS, "got %u\n", r); + ok(len == 45, "got %u\n", len); + ok(!strcmp(prod, "{90150000-006E-0409-0000-0000000FF1CE}"), "got '%s'\n", prod); + ok(!strcmp(feature, "AlwaysInstalledIntl_1033"), "got '%s'\n", feature); + ok(!comp[0], "got '%s'\n", comp); + /* * Test a valid feature descriptor with the * maximum number of characters and some trailing characters.
1
0
0
0
Nikolay Sivov : advapi32: Remove stub message from implemented function.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 8aed9e9074e489747d765165d5a479fbb223ba23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8aed9e9074e489747d765165d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 25 08:37:39 2016 +0300 advapi32: Remove stub message from implemented function. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 92a1789..28331df 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -791,7 +791,7 @@ BOOL WINAPI SetTokenInformation( HANDLE token, TOKEN_INFORMATION_CLASS tokeninfoclass, LPVOID tokeninfo, DWORD tokeninfolength ) { - TRACE("(%p, %s, %p, %d): stub\n", + TRACE("(%p, %s, %p, %d)\n", token, (tokeninfoclass == TokenUser) ? "TokenUser" : (tokeninfoclass == TokenGroups) ? "TokenGroups" :
1
0
0
0
Nikolay Sivov : quartz: Remove stub messages for implemented methods.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 1fbbd154fd6670a94f624b51a8442b9a3635f104 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fbbd154fd6670a94f624b51a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 25 08:26:30 2016 +0300 quartz: Remove stub messages for implemented methods. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtermapper.c | 2 +- dlls/quartz/vmr9.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index 8a1fc3a..4e4cb37 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -1157,7 +1157,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters( REGFILTER* regfilters; HRESULT hr; - TRACE("(%p/%p)->(%p, %x, %s, %s, %s, %s, %s, %s, %s) stub!\n", + TRACE("(%p/%p)->(%p, %x, %s, %s, %s, %s, %s, %s, %s)\n", This, iface, ppEnum, diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index fb6745d..3c8393f 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1256,7 +1256,7 @@ static HRESULT WINAPI VMR7FilterConfig_GetRenderingMode(IVMRFilterConfig *iface, { struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface); - TRACE("(%p/%p)->(%p) stub\n", iface, This, mode); + TRACE("(%p/%p)->(%p)\n", iface, This, mode); if (!mode) return E_POINTER; if (This->mode) @@ -1679,7 +1679,7 @@ static HRESULT WINAPI VMR9FilterConfig_GetRenderingMode(IVMRFilterConfig9 *iface { struct quartz_vmr *This = impl_from_IVMRFilterConfig9(iface); - TRACE("(%p/%p)->(%p) stub\n", iface, This, mode); + TRACE("(%p/%p)->(%p)\n", iface, This, mode); if (!mode) return E_POINTER;
1
0
0
0
Nikolay Sivov : uxtheme: Remove stub message for implemented functions.
by Alexandre Julliard
25 Oct '16
25 Oct '16
Module: wine Branch: master Commit: 456211e30735b02be37046bbd51a3c754409401a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=456211e30735b02be37046bbd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 25 08:21:27 2016 +0300 uxtheme: Remove stub message for implemented functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/draw.c | 2 +- dlls/uxtheme/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 8f0eabe..2a37a56 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -2016,7 +2016,7 @@ HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId, LOGFONTW logfont; RECT rt = {0,0,0xFFFF,0xFFFF}; - TRACE("%d %d: stub\n", iPartId, iStateId); + TRACE("%d %d\n", iPartId, iStateId); if(!hTheme) return E_HANDLE; diff --git a/dlls/uxtheme/main.c b/dlls/uxtheme/main.c index 5c0acf1..73894e8 100644 --- a/dlls/uxtheme/main.c +++ b/dlls/uxtheme/main.c @@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme); /* For the moment, do nothing here. */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { - TRACE("%p 0x%x %p: stub\n", hInstDLL, fdwReason, lpv); + TRACE("%p 0x%x %p\n", hInstDLL, fdwReason, lpv); switch(fdwReason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hInstDLL);
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
46
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
Results per page:
10
25
50
100
200