是不是这样: 2.type mydef SAM as long length as long width as long NEXT as varid end type 请指正
2. type Mydef SAM as byte length as long width as single lNEXT as long '(Next在VB中是保留字) end type
typedef long (FAR *mydefine) (void FAR *,long FAR *) 请问这句C如何转变为vb的 TYPE ... END TYPE 模式
是这样吗? TYPE mydefine aaa as byte bbb as long END TYPE 请指正!!!
在C中有如下的定义: typedef long (FAR *mydefine) (void FAR *,long FAR *) 请问如何把她移植到VB中 type mydefine ... end type tks!!!
1. typedef long (FAR *mydefine) (void FAR *,long FAR *) 这个你就别想了,呵呵,VB做不到,但你一般可以声明成 Long 类型的,不会出错, 除非你还要调用这个类型的函数,那就没办法了。2. typedef struct{ unsigned char FAR *SAM; long length; float width; void FAR *NEXT} Mydefprivate/public type MyDef sam as integer length as long width as single/double '感觉应该是前者 lNext as long end type3. int myfunc1(Mydef FAR *) as long function myfunc1(m as mydef)4. int myfunc2() function myfunc2() as long只能这样。
错了错了(我错了 ^_^ )2. typedef struct{ unsigned char FAR *SAM; long length; float width; void FAR *NEXT} Mydefprivate/public type MyDef sam as byte length as long width as single/double '感觉应该是前者 lNext as long end type另:你可以用C语言的 sizeof 和VB的 Len() 比较一下两个结构的大小,必须保证一样哦!
2.type mydef
SAM as long
length as long
width as long
NEXT as varid
end type
请指正
SAM as byte
length as long
width as single
lNEXT as long '(Next在VB中是保留字)
end type
请问这句C如何转变为vb的
TYPE
...
END TYPE
模式
TYPE mydefine
aaa as byte
bbb as long
END TYPE
请指正!!!
typedef long (FAR *mydefine) (void FAR *,long FAR *)
请问如何把她移植到VB中
type mydefine
...
end type
tks!!!
这个你就别想了,呵呵,VB做不到,但你一般可以声明成 Long 类型的,不会出错,
除非你还要调用这个类型的函数,那就没办法了。2. typedef struct{
unsigned char FAR *SAM;
long length;
float width;
void FAR *NEXT} Mydefprivate/public type MyDef
sam as integer
length as long
width as single/double '感觉应该是前者
lNext as long
end type3. int myfunc1(Mydef FAR *) as long
function myfunc1(m as mydef)4. int myfunc2()
function myfunc2() as long只能这样。
unsigned char FAR *SAM;
long length;
float width;
void FAR *NEXT} Mydefprivate/public type MyDef
sam as byte
length as long
width as single/double '感觉应该是前者
lNext as long
end type另:你可以用C语言的 sizeof 和VB的 Len() 比较一下两个结构的大小,必须保证一样哦!