/* * Copyright (c) 2026, Chloe M., et al. * Provided under the BSD-3 clause. * * Description: Program status codes * Author: Chloe M. */ #ifndef _PTAPI_STATUS_H_ #define _PTAPI_STATUS_H_ 1 #include /* * All functions and routines that are to return a status code * should be of this return type. */ typedef ULONG PT_STATUS; /* Valid status codes */ #define STATUS_SUCCESS 0 /* Operation completed sucessfully */ #define STATUS_FAILURE 1 /* Unspecified / generic failure */ #define STATUS_NO_MEMORY 2 /* Out of memory */ #define STATUS_NOT_DIRECTORY 3 /* Not a directory */ #define STATUS_IO_ERROR 4 /* I/O error */ #define STATUS_INVALID_PARAM 5 /* Invalid parameter */ #define STATUS_ACCESS_DENIED 6 /* Access to resource is denied */ #define STATUS_NOT_FOUND 7 /* Resource not found */ /* * Developers are encouraged to use this macro rather than directly * handling the conditional. */ #define PT_ERROR(STATUS) \ ((STATUS) != STATUS_SUCCESS) #endif /* !_PTAPI_STATUS_H_ */