用vb调用一个"gajmk.dll"动态库,
启动一个函数
extern "c" int WINAPI GetInformation(int length,CertInformation *pcertitem)
结构如此定义
typedef struct
{
char *SerialNum; //学号
char *dns
char *ip
char *email
unsigned char Pubkeyinformation[128]
}CertInformation
然后我在vb中
public declare function GetInformation lib "gajmk.dll" (byval length as long ,pcertitem as CertInformation) as longpublic type CertInformation
SerialNum as long
dns as long
ip as long
email as long
Pubkeyinformation(127) as byte
end type
这样声明是可以但是我得到的数组的各成员都是地址,那我数组中各元素所得的都为地址阿,在vb里怎么由这些地址取到值呢!啊)!!??
启动一个函数
extern "c" int WINAPI GetInformation(int length,CertInformation *pcertitem)
结构如此定义
typedef struct
{
char *SerialNum; //学号
char *dns
char *ip
char *email
unsigned char Pubkeyinformation[128]
}CertInformation
然后我在vb中
public declare function GetInformation lib "gajmk.dll" (byval length as long ,pcertitem as CertInformation) as longpublic type CertInformation
SerialNum as long
dns as long
ip as long
email as long
Pubkeyinformation(127) as byte
end type
这样声明是可以但是我得到的数组的各成员都是地址,那我数组中各元素所得的都为地址阿,在vb里怎么由这些地址取到值呢!啊)!!??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货