IWSManEx::GetErrorMessage method

Returns a formatted string containing the text of an error number. This method performs the same operation as the Winrm command-line winrm helpmsg error number.

Syntax


HRESULT GetErrorMessage(
  [in]  DWORD errorNumber,
  [out] BSTR  *errorMessage
);

Parameters

errorNumber [in]

Error message number in decimal or hexadecimal from WinRM, WinHTTP, or other operating system components.

errorMessage [out]

Error message string formatted like messages returned from the Winrm command.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The corresponding scripting method is WSMan.GetErrorMessage.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

WSManDisp.h

IDL

WSManDisp.idl

Library

WSManDisp.tlb

DLL

WSMAuto.dll

See also

IWSManEx
IWSManSession

 

 

Show: