VB结构体的字节对齐和VC结构体的字节对齐有什么区别
DISP_FUNCTION_ID(CSCMUSBINFAXCtrl,"AddLongs_Pointer",2,AddLongs_Pointer,VT_I4 ,VTS_PI2)
vc的接口函数没有char指针类型的输入参数(VTS_),在vb中应用时定义一个结构体:
Private Type USB_iobuf
led1 As Integer
led2 As Byte
port As Byte
analog1 As Byte
analog2 As Byte
not_used(59) As Byte
End Type
将led1的integer地址传入接口(占2位),以后的地址就是char的对应数组了.
DISP_FUNCTION_ID(CSCMUSBINFAXCtrl,"AddLongs_Pointer",2,AddLongs_Pointer,VT_I4 ,VTS_PI2)
vc的接口函数没有char指针类型的输入参数(VTS_),在vb中应用时定义一个结构体:
Private Type USB_iobuf
led1 As Integer
led2 As Byte
port As Byte
analog1 As Byte
analog2 As Byte
not_used(59) As Byte
End Type
将led1的integer地址传入接口(占2位),以后的地址就是char的对应数组了.
浙公网安备 33010602011771号