diff --git a/src/WinAPI/NativeMethods/ErrorCodes.cs b/src/WinAPI/NativeMethods/ErrorCodes.cs new file mode 100644 index 0000000..1b8f0e2 --- /dev/null +++ b/src/WinAPI/NativeMethods/ErrorCodes.cs @@ -0,0 +1,49 @@ +namespace Larin.WinAPI.NativeMethods; + +/// +/// Windows System Error codes +/// +/// https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes +public static class ErrorCodes +{ + /// + /// The operation completed successfully. + /// + public const int ERROR_SUCCESS = 0; + + /// + /// Incorrect function. + /// + public const int ERROR_INVALID_FUNCTION = 1; + + /// + /// The system cannot find the file specified. + /// + public const int ERROR_FILE_NOT_FOUND = 2; + + /// + /// The system cannot find the path specified. + /// + public const int ERROR_PATH_NOT_FOUND = 3; + + /// + /// The system cannot open the file. + /// + public const int ERROR_TOO_MANY_OPEN_FILES = 4; + + /// + /// Access is denied. + /// + public const int ERROR_ACCESS_DENIED = 5; + + /// + /// The handle is invalid. + /// + public const int ERROR_INVALID_HANDLE = 6; + + /// + /// No more data is available. + /// + public const int ERROR_NO_MORE_ITEMS = 259; +} +