vc 翻译成delphi(50分)

  • 主题发起人 主题发起人 zhongme_007
  • 开始时间 开始时间
Z

zhongme_007

Unregistered / Unconfirmed
GUEST, unregistred user!
int __stdcall OpenConnection(int *mCid,const char *mIpAddrOfServer,int mTcpPort,const char *mUserId,const char *mSubId,const char *mPassword);

int __stdcall OpenConnectionEx(int *mCid,const char *mIpAddrOfServer,int mTcpPort,const char *mUserIdEx,const char *mPassword,int mServerTimeOut,BOOL mTraceFlag);

int __stdcall SendFaxToServer(int mCid,const char *faxFileName,int priority,SSendTask sendTask[], int numOfTask,char *jobNo);

int __stdcall SendPHFaxToServer(int mCid,const char *faxFileName,int priority,SFZSendTask fzsendTask[], int numOfTask,char *jobNo);

int __stdcall QueryResultForNewRecvTasks(int mCid,int *numOfTasks);

int __stdcall PickResultRecvTask(int mCid,SResultRecvTask *mResultRecvTask,const char *mRecvDir);

int __stdcall CancelSendJob(int mCid,const char *mJobNo);
int __stdcall QueryResultForNewTasks(int mCid,int *numOfTasks);
int __stdcall PickResultTask(int mCid, SResultTask *resultTask);
 
其中的结构申明如下:
typedef struct sSendTask
{
char CalledNumber[TELEPHONENUMBERLEN];
int TaskId;
}SSendTask;

typedef struct sFZSendTask
{
char CalledNumber[TELEPHONENUMBERLEN];
char GuestName[MAXGUESTNAMELEN];
char GuestCompany[MAXCOMPANYLEN];
int TaskId;
}SFZSendTask;



typedef struct su_time
{
unsigned short Year;
unsigned short Month;
unsigned short Day;
unsigned short Hour;
unsigned short Minute;
unsigned short Second;
}u_time;


typedef struct sResultTask
{
int TaskId;
u_time StartTime;
u_time EndTime;
int NumOfSendedPages;
int SendTimes;
int Result;
double BillingFee;
}SResultTask;

typedef struct sResultRecvTask
{
int TaskId;
char CallingNumber[TELEPHONENUMBERLEN];
u_time StartTime;
u_time EndTime;
int NumOfRecvPages;
int RecvResult;
char GuestSid[MAXSIDLEN];
char RecvFileName[RECVINFOLEN];
}SResultRecvTask;
 
typedef struct sSendTask
{
char CalledNumber[TELEPHONENUMBERLEN];
int TaskId;
}SSendTask;

int __stdcall SendFaxToServer(int mCid,const char *faxFileName,int priority,SSendTask sendTask[], int numOfTask,char *jobNo);
=======================
type
Pssendtask=^TsSendTask;
TsSendTask =record
CalledNumber:array [0..TELEPHONENUMBERLEN] of char;
TaskId:integer;
end;

SendFaxToServer(var mCid:integer;const faxFileName:pchar;var priority:integer;sendTask:Pssendtask;var numOfTask:integer,var jobNo:pchar):integer;stdcall;

这里说明1点,数组参数的传递.如果你是delphi2005就可以直接传递数组参数
如果是delphi7就需要定义数组指针(如上)。
其他类似。
 
后退
顶部