vfp如何调用带结构参数的dll函数
MvxSock.dll函数MvxSockConnect定义如下
unsigned long CALLBACK MvxSockConnect( PSERVER_ID pstruct, char *Host, int Port,
char *UserId, char *Pwd, char *MI, char *Key);
其中SERVER_ID是一个结构类型,定义如下
typedef struct _SERVER_ID { /* size 440, in AS400 560 */
char ServerName[32];
unsigned short ServerPortNr;
unsigned short usFlags;
char ApplicationName[17];
char MessageID[8];
char BadField[7];
char Buff[256];
MvxSocket TheSocket;
int cryptOn; /* 4 bytes - Crypto: 1 is on & 0 is off */
unsigned char cryptKey[57]; /* 57 bytes - Crypto key: maximum 448 bits */
int Trim; /* This position earlier kept the "Mode" variable. */
int iNextGen; /* Indicates if we are running against NextGen */
int iToken; /* Holds the token from NextGen*/
char *pFld;
char *pCurTrans;
char *pTrans;
PFLDMAP pOut;
PFLDMAP pIn;
B_FIELD *field;
#if defined(__SUN__) || defined(__AIX__) || defined(__LINUX__)
iconv_t toAnsi; /* In Sun we need to use iconv for Ansi/UCS2 conversion */
iconv_t toUCS2;
char reserved[7]; /* 7 bytes - For future use */
#elif defined(__AS400__)
iconv_t *toEbcdic; /* In AS400 we need to use iconv for Ebcdic/UCS2 conversion */
iconv_t *toUCS2; /* In AS400 iconv_t is a struct so we use pointers (allocated space) */
char reserved[7]; /* 7 bytes - For future use */
#else
unsigned char *zipb;
char reserved[11]; /* 11 bytes - For future use */
#endif
} SERVER_ID, *PSERVER_ID;
在VFP中应该如何调用MvxSockConnect函数呢?
DECLARE INTEGER MvxSockConnect IN MvxSock ;
STRING @PSERVER_ID, STRING Host, INT Port, STRING UserID, STRING Pwd, ;
STRING MI, STRING Key
lnConnHandle = MvxSockConnect(@sid, "192.168.100.70", 16800, "lawson2", "lawson2", "MMS200MI", NULL)
其中@sid不知道如何定义,望高人指点!