#include "base/util/utils.h"
#include "spds/DESEncoder.h"
+#include "base/globalsdef.h"
+
+USE_NAMESPACE
DESEncoder::DESEncoder() : DataTransformer(DT_DES) {
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if ((res == FALSE) && (GetLastError() != ERROR_MORE_DATA)) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
);
if (res == FALSE) {
- lastErrorCode = ERR_DT_FAILURE;
- sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ //lastErrorCode = ERR_DT_FAILURE;
+ //sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
+ setErrorF(ERR_DT_FAILURE, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
info.size = sizeIn;
- info.newReturnedData = TRUE;
+ info.newReturnedData = true;
exit:
return ret;
-}
\ No newline at end of file
+}