init
This commit is contained in:
34
DataPRO/DbAPI/Errors/ErrorCodes.cs
Normal file
34
DataPRO/DbAPI/Errors/ErrorCodes.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
namespace DbAPI.Errors
|
||||
{
|
||||
public abstract class ErrorCodes
|
||||
{
|
||||
public const ulong ERROR_SUCCESS = 0x0;
|
||||
public const ulong ERROR_INVALID_FUNCTION = 0x1;
|
||||
public const ulong ERROR_FILE_NOT_FOUND = 0x2;
|
||||
public const ulong ERROR_PATH_NOT_FOUND = 0x3;
|
||||
public const ulong ERROR_ACCESS_DENIED = 0x5;
|
||||
public const ulong ERROR_NOT_SUPPORTED = 0x32;
|
||||
public const ulong INVALID_SESSIONID = 0x200;
|
||||
public const ulong ERROR_UNKNOWN = 0x201;
|
||||
public const ulong ERROR_NOUSER = 0x202;
|
||||
public const ulong ERROR_LOGINFAILED = 0x203;
|
||||
public const ulong ERROR_MISSING_PARAMETER = 0x204;
|
||||
public static string ResultToString(ulong hr)
|
||||
{
|
||||
switch (hr)
|
||||
{
|
||||
case ERROR_SUCCESS: return @"SUCCESS";
|
||||
case ERROR_INVALID_FUNCTION: return @"INVALID_FUNCTION";
|
||||
case ERROR_FILE_NOT_FOUND: return @"FILE_NOT_FOUND";
|
||||
case ERROR_PATH_NOT_FOUND: return @"PATH_NOT_FOUND";
|
||||
case ERROR_ACCESS_DENIED: return @"ACCESS_DENIED";
|
||||
case ERROR_NOT_SUPPORTED: return @"NOT_SUPPORTED";
|
||||
case INVALID_SESSIONID: return @"INVALID_SESSIONID";
|
||||
case ERROR_UNKNOWN: return @"UNKNOWN_ERROR";
|
||||
case ERROR_NOUSER: return @"NO_USER";
|
||||
case ERROR_LOGINFAILED: return "LOGIN_FAILED";
|
||||
default: return hr.ToString("X");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user