diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index a8e82ec1bc7..0a77d45d055 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -88,7 +88,7 @@ @ stub WsGetServiceHostProperty @ stub WsGetServiceProxyProperty @ stub WsGetWriterPosition -@ stub WsGetWriterProperty +@ stdcall WsGetWriterProperty(ptr long ptr long ptr) @ stub WsGetXmlAttribute @ stub WsInitializeMessage @ stub WsMarkHeaderAsUnderstood diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c index e9147fc3e2e..51711e496cc 100644 --- a/dlls/webservices/writer.c +++ b/dlls/webservices/writer.c @@ -92,6 +92,15 @@ static HRESULT set_writer_prop( struct writer *writer, WS_XML_WRITER_PROPERTY_ID return S_OK; } +static HRESULT get_writer_prop( struct writer *writer, WS_XML_WRITER_PROPERTY_ID id, void *buf, ULONG size ) +{ + if (id >= writer->prop_count || size != writer_props[id].size) + return E_INVALIDARG; + + memcpy( buf, writer->prop[id].value, writer->prop[id].valueSize ); + return S_OK; +} + /************************************************************************** * WsCreateWriter [webservices.@] */ @@ -141,3 +150,17 @@ void WINAPI WsFreeWriter( WS_XML_WRITER *handle ) TRACE( "%p\n", handle ); heap_free( writer ); } + +/************************************************************************** + * WsGetWriterProperty [webservices.@] + */ +HRESULT WINAPI WsGetWriterProperty( WS_XML_WRITER *handle, WS_XML_WRITER_PROPERTY_ID id, + void *buf, ULONG size, WS_ERROR *error ) +{ + struct writer *writer = (struct writer *)handle; + + TRACE( "%p %u %p %u %p\n", handle, id, buf, size, error ); + if (error) FIXME( "ignoring error parameter\n" ); + + return get_writer_prop( writer, id, buf, size ); +}