K
kite20020304
Unregistered / Unconfirmed
GUEST, unregistred user!
在delphi中如何实现如下的强制类型转换?
TPINIT *tpinfo;
if ((tpinfo = (TPINIT *)tpalloc("TPINIT", NULL, TPINITNEED(0))) == NULL)
【注:
1、struct tpinfo_t {
char usrname[MAXTIDENT+2]; /* client user name */
char cltname[MAXTIDENT+2]; /* application client name */
char passwd[MAXTIDENT+2]; /* application password */
char grpname[MAXTIDENT+2]; /* client group name */
long flags; /* initialization flags */
long datalen; /* length of app specific data */
long data; /* placeholder for app data */
};
typedef struct tpinfo_t TPINIT;
2、tpalloc在Delphi中的声明为
function tpalloc(types : pChar
subtype : pchar
size : longint): pChar;stdcall;external WTUXWS32_DLL;
】
TPINIT *tpinfo;
if ((tpinfo = (TPINIT *)tpalloc("TPINIT", NULL, TPINITNEED(0))) == NULL)
【注:
1、struct tpinfo_t {
char usrname[MAXTIDENT+2]; /* client user name */
char cltname[MAXTIDENT+2]; /* application client name */
char passwd[MAXTIDENT+2]; /* application password */
char grpname[MAXTIDENT+2]; /* client group name */
long flags; /* initialization flags */
long datalen; /* length of app specific data */
long data; /* placeholder for app data */
};
typedef struct tpinfo_t TPINIT;
2、tpalloc在Delphi中的声明为
function tpalloc(types : pChar
subtype : pchar
size : longint): pChar;stdcall;external WTUXWS32_DLL;
】