Hans Leidekker : webservices: Implement WsSendReplyMessage.

Alexandre Julliard julliard at winehq.org
Wed Sep 6 14:45:36 CDT 2017


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Sep  6 15:56:06 2017 +0200

webservices: Implement WsSendReplyMessage.

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

---

 dlls/webservices/channel.c        | 39 +++++++++++++++++++++++++++++++++++++++
 dlls/webservices/webservices.spec |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c
index 5db6f1d..87184c7 100644
--- a/dlls/webservices/channel.c
+++ b/dlls/webservices/channel.c
@@ -1126,6 +1126,45 @@ done:
     return hr;
 }
 
+/**************************************************************************
+ *          WsSendReplyMessage		[webservices.@]
+ */
+HRESULT WINAPI WsSendReplyMessage( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_MESSAGE_DESCRIPTION *desc,
+                                   WS_WRITE_OPTION option, const void *body, ULONG size, WS_MESSAGE *request,
+                                   const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error )
+{
+    struct channel *channel = (struct channel *)handle;
+    HRESULT hr;
+
+    TRACE( "%p %p %p %08x %p %u %p %p %p\n", handle, msg, desc, option, body, size, request, ctx, error );
+    if (error) FIXME( "ignoring error parameter\n" );
+    if (ctx) FIXME( "ignoring ctx parameter\n" );
+
+    if (!channel || !msg || !desc || !request) return E_INVALIDARG;
+
+    EnterCriticalSection( &channel->cs );
+
+    if (channel->magic != CHANNEL_MAGIC)
+    {
+        LeaveCriticalSection( &channel->cs );
+        return E_INVALIDARG;
+    }
+
+    if ((hr = WsInitializeMessage( msg, WS_REPLY_MESSAGE, NULL, NULL )) != S_OK) goto done;
+    if ((hr = WsAddressMessage( msg, &channel->addr, NULL )) != S_OK) goto done;
+    if ((hr = message_set_action( msg, desc->action )) != S_OK) goto done;
+
+    if ((hr = init_writer( channel )) != S_OK) goto done;
+    if ((hr = write_message( msg, channel->writer, desc->bodyElementDescription, option, body, size )) != S_OK)
+        goto done;
+    hr = send_message( channel, msg );
+
+done:
+    LeaveCriticalSection( &channel->cs );
+    FIXME( "returning %08x\n", hr );
+    return hr;
+}
+
 static HRESULT resize_read_buffer( struct channel *channel, ULONG size )
 {
     if (!channel->read_buf)
diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec
index 5f9cce8..53fe547 100644
--- a/dlls/webservices/webservices.spec
+++ b/dlls/webservices/webservices.spec
@@ -144,7 +144,7 @@
 @ stub WsRevokeSecurityContext
 @ stub WsSendFaultMessageForError
 @ stdcall WsSendMessage(ptr ptr ptr long ptr long ptr ptr)
-@ stub WsSendReplyMessage
+@ stdcall WsSendReplyMessage(ptr ptr ptr long ptr long ptr ptr ptr)
 @ stdcall WsSetChannelProperty(ptr long ptr long ptr)
 @ stdcall WsSetErrorProperty(ptr long ptr long)
 @ stub WsSetFaultErrorDetail




More information about the wine-cvs mailing list