H
huayan889
Unregistered / Unconfirmed
GUEST, unregistred user!
哪位大侠出手将下列VC++的语句转换为Delphi语句,300分奉上,不够另加,在线急等。
1.
typedef Void (*EsrFunc)(unsigned long esrParam);
typedef struct
{
char m_s8ServerIp[32]
unsigned long m_u32ServerPort
char m_s8UserName[32]
char m_s8UserPwd[32]
}ServerID_t;
typedef struct
{
unsigned long m_u32DataSize
}PrivateData_t;
//以上两段定义是为了表述在下面函数中的ServerID_T及PrivateData_t,可以不用转换。
int WINAPI XMS_acsOpenStream(unsigned long * acsHandle,ServerID_t *serverID,DJ_U8 u8AppID, PrivateData_t * privateData);
int WINAPI XMS_acsSetESR(unsigned long acsHandle,EsrFunc esr,unsigned long esrParam,BOOL notifyAll);
2.
#define FetchEventData(pAcsEvt) ((char *)pAcsEvt + sizeof(Acs_Evt_t))
#define FetchDeviceList(pAcsEvt) ((char *)FetchEventData(pAcsEvt) + sizeof(Acs_Dev_List_Head_t))
3.
typedef struct
{
unsigned char m_u8PkgExtend;
unsigned int m_u16DataLen;
struct ITP_GUID_tag
{
unsigned char m_u8ModuleType
unsigned char m_u8MainFuncId
}ITP_GUID;
unsigned int m_u16Reserve
}PKG_HEAD_STRUCT, *PPKG_HEAD_STRUCT;
Long ITP_Msg_AttachData(PPKG_HEAD_STRUCT *ppPkgHead,unsigned char *u8pData, long s32DataLen);
4.
typedef Long (*PTIMERFUNC)(Long *);
typedef struct _tagITP_FLOW_INFO ITP_FLOW_INFO,*PITP_FLOW_INFO;
typedef struct _tagITP_FLOW_CHAN ITP_FLOW_CHAN,*PITP_FLOW_CHAN;
typedef struct _tagITP_RES_CHAN ITP_RES_CHAN, *PITP_RES_CHAN;
typedef struct _tagITP_FLOW_TIMER ITP_FLOW_TIMER, *PITP_FLOW_TIMER;
typedef struct _tagITP_FLOW_INFO
{
unsigned char m_s8FlowName[ITP_FLOW_MAX_FLOWNAME_LEN]
unsigned Long* m_hdlDllFunc[ITP_MAX_DLLFUNC_NUM]
PITP_FLOW_CHAN *m_PITPFlowChan
}ITP_FLOW_INFO,*PITP_FLOW_INFO;
typedef struct _tagITP_FLOW_CHAN
{
PITP_FLOW_INFO m_PITPFlowInfo
PITP_RES_CHAN m_PITPResList[ITP_MAX_BINDRES_NUM];
PITP_FLOW_TIMER m_PITPTimerChan[ITP_MAX_BINDTIMER_NUM];
unsigned char *m_PITPFlowExtData
unsigned char *m_PITPPublicBuf
}ITP_FLOW_CHAN,*PITP_FLOW_CHAN;
typedef struct _tagITP_RES_CHAN
{
unsigned char m_u8UnitIndex
Char m_s8InfoBuf[ITP_FLOW_SHOW_INFO_NUM][ITP_FLOW_SHOW_INFO_SIZE];
}ITP_RES_CHAN,*PITP_RES_CHAN;
//下面这段定义起描述作用,可以不用转换
typedef struct _tagITP_FLOW_TIMER
{
PITP_FLOW_CHAN m_PITPFlowChan
PTIMERFUNC m_PITPTimerFunc
}ITP_FLOW_TIMER,*PITP_FLOW_TIMER;
6.
typedef unsigned char (*PFUNC_GETSELFUNITID)();
typedef unsigned long (*PFUNC_GETMODIPPORT)(unsigned char u8ModType,unsigned char u8UnitId,Char * s8IPAddr);
typedef Long (*PFUNC_GETMODINIFILE)(Char * s8IniFile);
typedef unsigned char (*PFUNC_GETMODUNITID)(unsigned int);
typedef unsigned char (*PFUNC_GETMODALLUNITID)(unsigned char u8ModType,unsigned char u8UnitID[]);
typedef struct
{
PFUNC_GETSELFUNITID m_pGetSelfUnitId;
PFUNC_GETMODSTATE m_pGetModState;
}ITP_MOD_CALLBACK,*PITP_MOD_CALLBACK;
//以上这段定义起描述作用,可以不用转换
extern ITP_MOD_CALLBACK g_ITPCallBack;
#define GetSelfUnitId g_ITPCallBack.m_pGetSelfUnitId
#define GetModState g_ITPCallBack.m_pGetModState
----------------------------------------
晕,发出后才发现是两百分,解答后另开帖结分!!
1.
typedef Void (*EsrFunc)(unsigned long esrParam);
typedef struct
{
char m_s8ServerIp[32]
unsigned long m_u32ServerPort
char m_s8UserName[32]
char m_s8UserPwd[32]
}ServerID_t;
typedef struct
{
unsigned long m_u32DataSize
}PrivateData_t;
//以上两段定义是为了表述在下面函数中的ServerID_T及PrivateData_t,可以不用转换。
int WINAPI XMS_acsOpenStream(unsigned long * acsHandle,ServerID_t *serverID,DJ_U8 u8AppID, PrivateData_t * privateData);
int WINAPI XMS_acsSetESR(unsigned long acsHandle,EsrFunc esr,unsigned long esrParam,BOOL notifyAll);
2.
#define FetchEventData(pAcsEvt) ((char *)pAcsEvt + sizeof(Acs_Evt_t))
#define FetchDeviceList(pAcsEvt) ((char *)FetchEventData(pAcsEvt) + sizeof(Acs_Dev_List_Head_t))
3.
typedef struct
{
unsigned char m_u8PkgExtend;
unsigned int m_u16DataLen;
struct ITP_GUID_tag
{
unsigned char m_u8ModuleType
unsigned char m_u8MainFuncId
}ITP_GUID;
unsigned int m_u16Reserve
}PKG_HEAD_STRUCT, *PPKG_HEAD_STRUCT;
Long ITP_Msg_AttachData(PPKG_HEAD_STRUCT *ppPkgHead,unsigned char *u8pData, long s32DataLen);
4.
typedef Long (*PTIMERFUNC)(Long *);
typedef struct _tagITP_FLOW_INFO ITP_FLOW_INFO,*PITP_FLOW_INFO;
typedef struct _tagITP_FLOW_CHAN ITP_FLOW_CHAN,*PITP_FLOW_CHAN;
typedef struct _tagITP_RES_CHAN ITP_RES_CHAN, *PITP_RES_CHAN;
typedef struct _tagITP_FLOW_TIMER ITP_FLOW_TIMER, *PITP_FLOW_TIMER;
typedef struct _tagITP_FLOW_INFO
{
unsigned char m_s8FlowName[ITP_FLOW_MAX_FLOWNAME_LEN]
unsigned Long* m_hdlDllFunc[ITP_MAX_DLLFUNC_NUM]
PITP_FLOW_CHAN *m_PITPFlowChan
}ITP_FLOW_INFO,*PITP_FLOW_INFO;
typedef struct _tagITP_FLOW_CHAN
{
PITP_FLOW_INFO m_PITPFlowInfo
PITP_RES_CHAN m_PITPResList[ITP_MAX_BINDRES_NUM];
PITP_FLOW_TIMER m_PITPTimerChan[ITP_MAX_BINDTIMER_NUM];
unsigned char *m_PITPFlowExtData
unsigned char *m_PITPPublicBuf
}ITP_FLOW_CHAN,*PITP_FLOW_CHAN;
typedef struct _tagITP_RES_CHAN
{
unsigned char m_u8UnitIndex
Char m_s8InfoBuf[ITP_FLOW_SHOW_INFO_NUM][ITP_FLOW_SHOW_INFO_SIZE];
}ITP_RES_CHAN,*PITP_RES_CHAN;
//下面这段定义起描述作用,可以不用转换
typedef struct _tagITP_FLOW_TIMER
{
PITP_FLOW_CHAN m_PITPFlowChan
PTIMERFUNC m_PITPTimerFunc
}ITP_FLOW_TIMER,*PITP_FLOW_TIMER;
6.
typedef unsigned char (*PFUNC_GETSELFUNITID)();
typedef unsigned long (*PFUNC_GETMODIPPORT)(unsigned char u8ModType,unsigned char u8UnitId,Char * s8IPAddr);
typedef Long (*PFUNC_GETMODINIFILE)(Char * s8IniFile);
typedef unsigned char (*PFUNC_GETMODUNITID)(unsigned int);
typedef unsigned char (*PFUNC_GETMODALLUNITID)(unsigned char u8ModType,unsigned char u8UnitID[]);
typedef struct
{
PFUNC_GETSELFUNITID m_pGetSelfUnitId;
PFUNC_GETMODSTATE m_pGetModState;
}ITP_MOD_CALLBACK,*PITP_MOD_CALLBACK;
//以上这段定义起描述作用,可以不用转换
extern ITP_MOD_CALLBACK g_ITPCallBack;
#define GetSelfUnitId g_ITPCallBack.m_pGetSelfUnitId
#define GetModState g_ITPCallBack.m_pGetModState
----------------------------------------
晕,发出后才发现是两百分,解答后另开帖结分!!