DLL导入结构体 联合体
时间:10-02
整理:3721RD
点击:
DLL函数参数中,有结构体、联合体,结构体中使用联合体,
这种方式的函数怎么使用LABVIEW导入DLL共享库?
结构体好说,就是联合体不知道怎么弄~~
函数如下
int LoadConnection_ex6 (int ConNr, char* pAccessPoint, int ConTableLen,CON_TABLE_TYPE * pConTable);
#pragma pack(1)
typedef union {
unsigned char Mpi; // MPI/PB station address (2)
unsigned char Ip[4]; // IP address (192.168.0.1)
unsigned char Mac[6]; // MAC address (08-00-06-01-AA-BB)
} CON_ADR_TYPE;
typedef struct {
CON_ADR_TYPE Adr; // connection address
unsigned char AdrType; // Type of address: MPI/PB (1), IP (2), MAC (3)
unsigned char SlotNr; // Slot number
unsigned char RackNr; // Rack number
} CON_TABLE_TYPE;
#pragma pack(1)
这种方式的函数怎么使用LABVIEW导入DLL共享库?
结构体好说,就是联合体不知道怎么弄~~
函数如下
int LoadConnection_ex6 (int ConNr, char* pAccessPoint, int ConTableLen,CON_TABLE_TYPE * pConTable);
#pragma pack(1)
typedef union {
unsigned char Mpi; // MPI/PB station address (2)
unsigned char Ip[4]; // IP address (192.168.0.1)
unsigned char Mac[6]; // MAC address (08-00-06-01-AA-BB)
} CON_ADR_TYPE;
typedef struct {
CON_ADR_TYPE Adr; // connection address
unsigned char AdrType; // Type of address: MPI/PB (1), IP (2), MAC (3)
unsigned char SlotNr; // Slot number
unsigned char RackNr; // Rack number
} CON_TABLE_TYPE;
#pragma pack(1)
谢谢大佬的分享