diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 08dae6de11d..ac7de65cda4 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -95,6 +95,15 @@ static HRESULT set_error_prop( struct error *error, WS_ERROR_PROPERTY_ID id, con return S_OK; } +static HRESULT get_error_prop( struct error *error, WS_ERROR_PROPERTY_ID id, void *buf, ULONG size ) +{ + if (id >= error->prop_count || size != error_props[id].size) + return E_INVALIDARG; + + memcpy( buf, error->prop[id].value, error->prop[id].valueSize ); + return S_OK; +} + /************************************************************************** * WsCreateError [webservices.@] */ @@ -140,3 +149,29 @@ void WINAPI WsFreeError( WS_ERROR *handle ) TRACE( "%p\n", handle ); heap_free( error ); } + +/************************************************************************** + * WsGetErrorProperty [webservices.@] + */ +HRESULT WINAPI WsGetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, void *buf, + ULONG size ) +{ + struct error *error = (struct error *)handle; + + TRACE( "%p %u %p %u\n", handle, id, buf, size ); + return get_error_prop( error, id, buf, size ); +} + +/************************************************************************** + * WsSetErrorProperty [webservices.@] + */ +HRESULT WINAPI WsSetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, const void *value, + ULONG size ) +{ + struct error *error = (struct error *)handle; + + TRACE( "%p %u %p %u\n", handle, id, value, size ); + + if (id == WS_ERROR_PROPERTY_LANGID) return WS_E_INVALID_OPERATION; + return set_error_prop( error, id, value, size ); +} diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 9bf6496151b..0ff3c0d0b89 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -62,7 +62,7 @@ @ stub WsGetChannelProperty @ stub WsGetCustomHeader @ stub WsGetDictionary -@ stub WsGetErrorProperty +@ stdcall WsGetErrorProperty(ptr long ptr long) @ stub WsGetErrorString @ stub WsGetFaultErrorDetail @ stub WsGetFaultErrorProperty @@ -146,7 +146,7 @@ @ stub WsSendMessage @ stub WsSendReplyMessage @ stub WsSetChannelProperty -@ stub WsSetErrorProperty +@ stdcall WsSetErrorProperty(ptr long ptr long) @ stub WsSetFaultErrorDetail @ stub WsSetFaultErrorProperty @ stub WsSetHeader