用API写个程序,其中的的函数有结构体的定义
struct Query_Res{
unsigned long mt_total_msg; //从ICP接收的信息总数
unsigned long mt_total_user; //从ICP接收的用户总数
unsigned long mt_succ; //成功转发数量
unsigned long mt_wait; //待转发数量
unsigned long mt_fail; //转发失败数量
unsigned long mo_succ; //向ICP成功送达数量
unsigned long mo_wait; //向ICP待送达数量
unsigned long mo_fail; //向ICP送达失败数量
int CMPP_Query(int conn_id,char *date,unsigned char type,char *service,struct Query_Res *p_res);
我在DELPHI中调用CMPP_Query()函数,但这个Query_Res结构体类型如何定义呀??
谁帮帮我

解决方案 »

  1.   

    是不是定义为记录型类型就可以了
    q_res= record
                  mt_total_msg:longwordq; //从ICP接收的信息总数
                  mt_total_user:longwordq; //从ICP接收的用户总数
                  mt_succ:longwordq; //成功转发数量
                  mt_wait:longwordq; //待转发数量
                  mt_fail:longwordq; //转发失败数量
                  mo_succ:longwordq; //向ICP成功送达数量
                  mo_wait:longwordq; //向ICP待送达数量
                  mo_fail:longwordq; ) //向ICP送达失败数量
                  end;
      

  2.   

    Query_Res = package record
      

  3.   

    q_res= package record??
    可以吗??我在编译不通过呀??请帮帮我
      

  4.   

    type q_res record
      mt_total_msg:longwordq; //从ICP接收的信息总数
                  mt_total_user:longwordq; //从ICP接收的用户总数
                  mt_succ:longwordq; //成功转发数量
                 mt_wait:longwordq; //待转发数量
                  mt_fail:longwordq; //转发失败数量
                  mo_succ:longwordq; //向ICP成功送达数量
                  mo_wait:longwordq; //向ICP待送达数量
                  mo_fail:longwordq; ) //向ICP送达失败数量
                  end;