- 论坛徽章:
- 0
|
int SendDataToMQ()
{
/* EXEC SQL BEGIN DECLARE SECTION; */
char cszUserId[80 + 1];
char szErr[128];
char buf[7000];
/* EXEC SQL END DECLARE SECTION; */
time_t currtime;
struct tm* tm_currtime;
counter* cotr = NULL;
flight_supplies_type* flt_sup = NULL;
jiewei_freight_type* jiewei_frei = NULL;
BUPDLS_type* bupdls = NULL;
get_down_freight_type* get_down_frei = NULL;
flight_freight_import* fri_frei_imp = NULL;
flight_freight_export* fri_frei_exp = NULL;
flight_freight_diversion* fri_frei_div = NULL;
service_time_email* ser_time_email = NULL;
cotr = (counter*)malloc(counter);
if(cotr == NULL)
{
WriteLogFile("SDMQ", "can not allocate memory for cotr", "");
return FAILED;
}
exp_charge = (exp_charge_type*)malloc(exp_charge_type);
if(exp_charge == NULL)
{
WriteLogFile("SDMQ", "can not allocate memory for exp_charge", "");
return FAILED;
}
flt_sup = (flight_supplies_type*)malloc(flight_supplies_type);
if(flt_sup == NULL)
{
WriteLogFile("SDMQ", "can not allocate memory for flt_sup", "");
return FAILED;
}
memset(szErr, '\0', sizeof(szErr));
memset(cszUserId, '\0', sizeof(cszUserId));
memset(buf, '\0', sizeof(buf));
ReadProfile(cszUserId, "USERID", getenv(EDIINI));
[ 本帖最后由 tempname_cn 于 2008-7-14 13:15 编辑 ] |
|