Hans Leidekker : webservices: Support WS_STRING values in WsSetHeader.

Alexandre Julliard julliard at winehq.org
Tue Aug 16 10:41:00 CDT 2016


Module: wine
Branch: master
Commit: b89f7d944382f4d398759482fcbbb69dd0f3e6ac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b89f7d944382f4d398759482fcbbb69dd0f3e6ac

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Aug 16 12:30:33 2016 +0200

webservices: Support WS_STRING values in WsSetHeader.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/webservices/msg.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index 904d490..487222e 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -598,6 +598,24 @@ static HRESULT alloc_header( WS_HEADER_TYPE type, WS_TYPE value_type, WS_WRITE_O
         memcpy( header->text.value.bytes, str->bytes, str->length );
         break;
     }
+    case WS_STRING_TYPE:
+    {
+        int len;
+        const WS_STRING *str = value;
+
+        if (option != WS_WRITE_REQUIRED_VALUE)
+        {
+            FIXME( "unhandled write option %u\n", option );
+            return E_NOTIMPL;
+        }
+        if (size != sizeof(*str)) return E_INVALIDARG;
+        len = WideCharToMultiByte( CP_UTF8, 0, str->chars, str->length, NULL, 0, NULL, NULL );
+        if (!(header = heap_alloc( sizeof(*header) + len ))) return E_OUTOFMEMORY;
+        set_utf8_text( &header->text, (BYTE *)(header + 1), len );
+        WideCharToMultiByte( CP_UTF8, 0, str->chars, str->length, (char *)header->text.value.bytes,
+                             len, NULL, NULL );
+        break;
+    }
     default:
         FIXME( "unhandled type %u\n", value_type );
         return E_NOTIMPL;




More information about the wine-cvs mailing list