diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index bff9a4b15ed..aa78d1e7623 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -1139,6 +1139,35 @@ done: return hr; } +/************************************************************************** + * WsWriteMessageEnd [webservices.@] + */ +HRESULT WINAPI WsWriteMessageEnd( WS_CHANNEL *handle, WS_MESSAGE *msg, const WS_ASYNC_CONTEXT *ctx, + WS_ERROR *error ) +{ + struct channel *channel = (struct channel *)handle; + HRESULT hr; + + TRACE( "%p %p %p %p\n", handle, msg, ctx, error ); + if (error) FIXME( "ignoring error parameter\n" ); + if (ctx) FIXME( "ignoring ctx parameter\n" ); + + if (!channel || !msg) return E_INVALIDARG; + + EnterCriticalSection( &channel->cs ); + + if (channel->magic != CHANNEL_MAGIC) + { + LeaveCriticalSection( &channel->cs ); + return E_INVALIDARG; + } + + if ((hr = WsWriteEnvelopeEnd( msg, NULL )) == S_OK) hr = send_message( channel, msg ); + + LeaveCriticalSection( &channel->cs ); + return hr; +} + HRESULT channel_accept_tcp( SOCKET socket, WS_CHANNEL *handle ) { struct channel *channel = (struct channel *)handle; diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 204e3f209f5..aa9b58f8a05 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -177,7 +177,7 @@ @ stdcall WsWriteEndStartElement(ptr ptr) @ stdcall WsWriteEnvelopeEnd(ptr ptr) @ stdcall WsWriteEnvelopeStart(ptr ptr ptr ptr ptr) -@ stub WsWriteMessageEnd +@ stdcall WsWriteMessageEnd(ptr ptr ptr ptr) @ stdcall WsWriteMessageStart(ptr ptr ptr ptr) @ stdcall WsWriteNode(ptr ptr ptr) @ stub WsWriteQualifiedName