102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
dttr_result.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  DTTR_Result

Typedefs

typedef enum DTTR_Status DTTR_Status
typedef struct DTTR_Result DTTR_Result

Enumerations

enum  DTTR_Status {
  DTTR_OK = 0 , DTTR_ERR_INVALID_ARGUMENT , DTTR_ERR_NOT_FOUND , DTTR_ERR_UNSUPPORTED ,
  DTTR_ERR_ALREADY_INSTALLED , DTTR_ERR_NOT_INSTALLED , DTTR_ERR_MEMORY_PROTECTION , DTTR_ERR_RUNTIME_UNAVAILABLE ,
  DTTR_ERR_ABI_MISMATCH , DTTR_ERR_OUT_OF_MEMORY , DTTR_ERR_HOOK_CHAIN_UNSUPPORTED , DTTR_ERR_MISSING_SYMBOL ,
  DTTR_ERR_UNRESOLVED , DTTR_ERR_NOT_CALLABLE , DTTR_ERR_READ_FAILED , DTTR_ERR_WRITE_FAILED ,
  DTTR_ERR_POLICY_MISMATCH , DTTR_ERR_UNSUPPORTED_LAYOUT , DTTR_ERR_UNSUPPORTED_CONTRACT , DTTR_ERR_PROVENANCE_UNSAFE
}

Functions

const char * DTTR_StatusName (DTTR_Status status)
bool DTTR_StatusOK (DTTR_Status status)
bool DTTR_StatusFailed (DTTR_Status status)
bool DTTR_ResultOK (DTTR_Result result)

Detailed Description

Shared SDK status and result helpers.

Definition in file dttr_result.h.

Typedef Documentation

◆ DTTR_Result

typedef struct DTTR_Result DTTR_Result

◆ DTTR_Status

typedef enum DTTR_Status DTTR_Status

Enumeration Type Documentation

◆ DTTR_Status

Enumerator
DTTR_OK 
DTTR_ERR_INVALID_ARGUMENT 
DTTR_ERR_NOT_FOUND 
DTTR_ERR_UNSUPPORTED 
DTTR_ERR_ALREADY_INSTALLED 
DTTR_ERR_NOT_INSTALLED 
DTTR_ERR_MEMORY_PROTECTION 
DTTR_ERR_RUNTIME_UNAVAILABLE 
DTTR_ERR_ABI_MISMATCH 
DTTR_ERR_OUT_OF_MEMORY 
DTTR_ERR_HOOK_CHAIN_UNSUPPORTED 
DTTR_ERR_MISSING_SYMBOL 
DTTR_ERR_UNRESOLVED 
DTTR_ERR_NOT_CALLABLE 
DTTR_ERR_READ_FAILED 
DTTR_ERR_WRITE_FAILED 
DTTR_ERR_POLICY_MISMATCH 
DTTR_ERR_UNSUPPORTED_LAYOUT 
DTTR_ERR_UNSUPPORTED_CONTRACT 
DTTR_ERR_PROVENANCE_UNSAFE 

Definition at line 13 of file dttr_result.h.

Function Documentation

◆ DTTR_ResultOK()

◆ DTTR_StatusFailed()

bool DTTR_StatusFailed ( DTTR_Status status)

Report whether an SDK status represents failure.

Parameters
statusStatus value returned by an SDK operation.
Returns
true when status is not DTTR_OK.

Definition at line 74 of file core.c.

References DTTR_StatusOK().

◆ DTTR_StatusName()

◆ DTTR_StatusOK()

bool DTTR_StatusOK ( DTTR_Status status)

Report whether an SDK status represents success.

Parameters
statusStatus value returned by an SDK operation.
Returns
true when status is DTTR_OK.

Definition at line 70 of file core.c.

References DTTR_OK.

Referenced by DTTR_ResultOK(), and DTTR_StatusFailed().