Skip to content

Latest commit

 

History

History
137 lines (82 loc) · 3.14 KB

nefarius.utilities.devicemanagement.exceptions.win32exception.md

File metadata and controls

137 lines (82 loc) · 3.14 KB

Win32Exception

Namespace: Nefarius.Utilities.DeviceManagement.Exceptions

A Win32 API has failed.

public class Win32Exception : System.Exception, System.Runtime.Serialization.ISerializable

Inheritance ObjectExceptionWin32Exception
Implements ISerializable

Properties

public IDictionary Data { get; }

Property Value

IDictionary

The native Windows error code.

public Nullable<Int32> ErrorCode { get; }

Property Value

Nullable<Int32>

The Win32 error message.

public string ErrorMessage { get; }

Property Value

String

public string HelpLink { get; set; }

Property Value

String

public int HResult { get; set; }

Property Value

Int32

public Exception InnerException { get; }

Property Value

Exception

public string Message { get; }

Property Value

String

public string Source { get; set; }

Property Value

String

public string StackTrace { get; }

Property Value

String

public MethodBase TargetSite { get; }

Property Value

MethodBase

Methods

Translates a Win32 error code to the user-readable message.

public static string GetMessageFor(Nullable<Int32> errorCode)

Parameters

errorCode Nullable<Int32>
The Win32 error code. Gets fetched from Marshal.GetLastWin32Error() if null.

Returns

The message, if any, or null.