C# Class System.IO.Win32Marshal

Provides static methods for converting from Win32 errors codes to exceptions, HRESULTS and error messages.
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Private Methods

Méthode Description
GetExceptionForLastWin32Error ( ) : Exception

Converts, resetting it, the last Win32 error into a corresponding Exception object.

GetExceptionForLastWin32Error ( string path ) : Exception

Converts, resetting it, the last Win32 error into a corresponding Exception object, optionally including the specified path in the error message.

GetExceptionForWin32Error ( int errorCode ) : Exception

Converts the specified Win32 error into a corresponding Exception object.

GetExceptionForWin32Error ( int errorCode, string path ) : Exception

Converts the specified Win32 error into a corresponding Exception object, optionally including the specified path in the error message.

GetMessage ( int errorCode ) : string

Returns a string message for the specified Win32 error code.

MakeHRFromErrorCode ( int errorCode ) : int

Returns a HRESULT for the specified Win32 error code.

TryMakeWin32ErrorCodeFromHR ( int hr ) : int

Returns a Win32 error code for the specified HRESULT if it came from FACILITY_WIN32 If not, returns the HRESULT unchanged