33 #define OPGP_ERROR_STATUS_SUCCESS ERROR_SUCCESS
35 #define OPGP_ERROR_STATUS_SUCCESS 0
38 #define OPGP_ERROR_STATUS_FAILURE 1
40 #define ERROR_MESSAGE_LENGTH 256
48 TCHAR errorMessage[ERROR_MESSAGE_LENGTH+1];
55 #define OPGP_ERROR_CHECK(status) status.errorStatus
63 #define OPGP_ERROR_CREATE_ERROR(status, code, message) status.errorStatus = OPGP_ERROR_STATUS_FAILURE; \
64 status.errorCode = code; \
65 _tcsncpy(status.errorMessage, message, ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
71 #define OPGP_ERROR_CREATE_NO_ERROR(status) status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; status.errorCode = 0; \
72 _tcsncpy(status.errorMessage, _T("Success"), ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
80 #define OPGP_ERROR_CREATE_NO_ERROR_WITH_CODE(status, code, message) status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; \
81 status.errorCode = code; \
82 _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:46
LONG errorCode
The error code.
Definition: error.h:47
long LONG
A long value.
Definition: types.h:53