Expand Minimize

WsCreateError function

Creates an error object that can passed to functions to record rich error information.

Syntax


HRESULT WINAPI  WsCreateError(
  const WS_ERROR_PROPERTY* properties,
  _In_  ULONG propertyCount,
  WS_ERROR** error
);

Parameters

properties

An array of WS_ERROR_PROPERTY structures containing optional error properties.

propertyCount [in]

The number of properties in the properties array.

error

On success, a pointer that receives the address of the WS_ERROR structure representing the created error object.

Return value

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

Return codeDescription
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

When you no long need the error object, free it by calling the WsFreeError function.

By default, the language of any language-dependent information in the error object is the current user default UI language. However, you can change the language by setting the WS_ERROR_PROPERTY_LANGID property. See the 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

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft