Export (0) Print
Expand All
Expand Minimize

WsGetErrorString function

Retrieves an error string from an error object.

Syntax


HRESULT WINAPI  WsGetErrorString(
  _In_   WS_ERROR* error,
  _In_   ULONG index,
  _Out_  WS_STRING* *string
);

Parameters

error [in]

The error object containing the string.

index [in]

The zero-based index identifying the string to retrieve. The first error string (index 0) will be the string most recently added to the error object (using WsAddErrorString). When WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE is presented in the error object, the corresponding error text will be available in the last index.

The number of errors can be retrieved using WS_ERROR_PROPERTY_STRING_COUNT.

string [out]

The returned string. The string is valid until WsResetError or WsFreeError is called.

The string is not zero terminated.

Return value

This function can return one of these values.

Return codeDescription
E_INVALIDARG

One or more arguments are invalid.

Other Errors

This function may return other errors not listed above.

 

Remarks

The string is in the language specified by the LANGID property of the error object. This can be retrieved using WsGetErrorProperty with WS_ERROR_PROPERTY_LANGID.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft