U
UnKnow365
Unregistered / Unconfirmed
GUEST, unregistred user!
以下是用C++写的一个DLL的.H文件,我对C不熟悉,请问在Delphi7下如何声明以下这些函数(静态加载,请给出函数声明,最好能解释一下),谢谢!
#ifdef _WIN32
#define STDCALL __stdcall
#else
#define STDCALL
#endif
#ifndef SDTAPI_
#define SDTAPI_
#ifdef __cplusplus
extern "C"{
#endif
/**********************************************************
********************** 端口类API *************************
**********************************************************/
int STDCALL SDT_SetMaxRFByte(int iPortID,unsigned char ucByte,int bIfOpen);
int STDCALL SDT_GetCOMBaud(int iComID,unsigned int *puiBaud);
int STDCALL SDT_SetCOMBaud(int iComID,unsigned int uiCurrBaud,unsigned int uiSetBaud);
int STDCALL SDT_OpenPort(int iPortID);
int STDCALL SDT_ClosePort(int iPortID);
int STDCALL SDT_GetErrorString(int ErrorCode, char * ErrorString);
/**********************************************************
********************** SAM类API **************************
**********************************************************/
int STDCALL SDT_GetSAMStatus(int iPortID,int iIfOpen);
int STDCALL SDT_ResetSAM(int iPortID,int iIfOpen);
int STDCALL SDT_GetSAMID(int iPortID,unsigned char *pucSAMID,int iIfOpen);
int STDCALL SDT_GetSAMIDToStr(int iPortID,char *pcSAMID,int iIfOpen);
/**********************************************************
******************* 卡类API ************************
**********************************************************/
int STDCALL SDT_StartFindIDCard(int iPortID,unsigned char *pucIIN,int iIfOpen);
int STDCALL SDT_SelectIDCard(int iPortID,unsigned char *pucSN,int iIfOpen);
int STDCALL SDT_ReadBaseMsg(int iPortID,unsigned char * pucCHMsg,unsigned int * puiCHMsgLen,unsigned char * pucPHMsg,unsigned int *puiPHMsgLen,int iIfOpen);
int STDCALL SDT_ReadFPMsg(int iPortID,unsigned char * pucFPMsg,unsigned int * puiFPMsgLen,int iIfOpen);
int STDCALL SDT_ReadIINSNDN(int iPortID,unsigned char * pucIINSNDN,int iIfOpen);
int STDCALL SDT_ReadNewAppMsg(int iPortID,unsigned char * pucAppMsg,unsigned int * puiAppMsgLen,int iIfOpen);
int STDCALL SDT_ReadBaseMsgToFile(int iPortID,char * pcCHMsgFileName,unsigned int * puiCHMsgFileLen,char * pcPHMsgFileName,unsigned int *puiPHMsgFileLen,int iIfOpen);
int STDCALL SDT_ReadIINSNDNToASCII(int iPortID, unsigned char *pucRecvData,int iIfOpen);
#ifdef __cplusplus
}
#endif
#endif
#ifdef _WIN32
#define STDCALL __stdcall
#else
#define STDCALL
#endif
#ifndef SDTAPI_
#define SDTAPI_
#ifdef __cplusplus
extern "C"{
#endif
/**********************************************************
********************** 端口类API *************************
**********************************************************/
int STDCALL SDT_SetMaxRFByte(int iPortID,unsigned char ucByte,int bIfOpen);
int STDCALL SDT_GetCOMBaud(int iComID,unsigned int *puiBaud);
int STDCALL SDT_SetCOMBaud(int iComID,unsigned int uiCurrBaud,unsigned int uiSetBaud);
int STDCALL SDT_OpenPort(int iPortID);
int STDCALL SDT_ClosePort(int iPortID);
int STDCALL SDT_GetErrorString(int ErrorCode, char * ErrorString);
/**********************************************************
********************** SAM类API **************************
**********************************************************/
int STDCALL SDT_GetSAMStatus(int iPortID,int iIfOpen);
int STDCALL SDT_ResetSAM(int iPortID,int iIfOpen);
int STDCALL SDT_GetSAMID(int iPortID,unsigned char *pucSAMID,int iIfOpen);
int STDCALL SDT_GetSAMIDToStr(int iPortID,char *pcSAMID,int iIfOpen);
/**********************************************************
******************* 卡类API ************************
**********************************************************/
int STDCALL SDT_StartFindIDCard(int iPortID,unsigned char *pucIIN,int iIfOpen);
int STDCALL SDT_SelectIDCard(int iPortID,unsigned char *pucSN,int iIfOpen);
int STDCALL SDT_ReadBaseMsg(int iPortID,unsigned char * pucCHMsg,unsigned int * puiCHMsgLen,unsigned char * pucPHMsg,unsigned int *puiPHMsgLen,int iIfOpen);
int STDCALL SDT_ReadFPMsg(int iPortID,unsigned char * pucFPMsg,unsigned int * puiFPMsgLen,int iIfOpen);
int STDCALL SDT_ReadIINSNDN(int iPortID,unsigned char * pucIINSNDN,int iIfOpen);
int STDCALL SDT_ReadNewAppMsg(int iPortID,unsigned char * pucAppMsg,unsigned int * puiAppMsgLen,int iIfOpen);
int STDCALL SDT_ReadBaseMsgToFile(int iPortID,char * pcCHMsgFileName,unsigned int * puiCHMsgFileLen,char * pcPHMsgFileName,unsigned int *puiPHMsgFileLen,int iIfOpen);
int STDCALL SDT_ReadIINSNDNToASCII(int iPortID, unsigned char *pucRecvData,int iIfOpen);
#ifdef __cplusplus
}
#endif
#endif