WsAddErrorString function (webservices.h)

Adds a specified error string to the error object.

Syntax

HRESULT WsAddErrorString(
  [in] WS_ERROR        *error,
  [in] const WS_STRING *string
);

Parameters

[in] error

Pointer to a WS_ERROR structure representing the error object to which to add the string.

[in] string

The string to add. The error object will make a copy of the string.

Return value

If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.

Return code Description
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Insufficient memory to complete the operation.
Other Errors
This function may return other errors not listed above.

Remarks

This function requires that the string be in the language specified by the LANGID of the error object. You can retrieve this LANGID value by calling the WsGetErrorProperty function with the WS_ERROR_PROPERTY_LANGID value of the WS_ERROR_PROPERTY_ID enumeration.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll