WsAddErrorString function
Adds a specified error string to the error object.
Syntax
HRESULT WINAPI WsAddErrorString(
_In_ WS_ERROR* error,
_In_ const WS_STRING* string
);
Parameters
- error [in]
-
Pointer to a WS_ERROR structure representing the error object to which to add the string.
- string [in]
-
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 |
|---|---|
|
One or more arguments are invalid. |
|
Insufficient memory to complete the operation. |
|
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
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|