46 #define OPGP_ERROR_STATUS_SUCCESS ERROR_SUCCESS
48 #define OPGP_ERROR_STATUS_SUCCESS 0
51 #define OPGP_ERROR_STATUS_FAILURE 1
53 #define ERROR_MESSAGE_LENGTH 256
61 TCHAR errorMessage[ERROR_MESSAGE_LENGTH+1];
68 #define OPGP_ERROR_CHECK(status) status.errorStatus
76 #define OPGP_ERROR_CREATE_ERROR(status, code, message) status.errorStatus = OPGP_ERROR_STATUS_FAILURE; \
77 status.errorCode = code; \
78 _tcsncpy(status.errorMessage, message, ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
84 #define OPGP_ERROR_CREATE_NO_ERROR(status) status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; status.errorCode = 0; \
85 _tcsncpy(status.errorMessage, _T("Success"), ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
93 #define OPGP_ERROR_CREATE_NO_ERROR_WITH_CODE(status, code, message) status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; \
94 status.errorCode = code; \
95 _tcsncpy(status.errorMessage, message, ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
LONG errorStatus
Identifies, if an error occurred. If no error occurred OPGP_ERROR_STATUS_SUCCESS must be set....
Definition: error.h:59
DWORD errorCode
The error code represented as an unsigned 32-bit value.
Definition: error.h:60
long LONG
A long value.
Definition: types.h:69
unsigned long DWORD
A Microsoft/Muscle DWORD definition.
Definition: types.h:68