Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Type typTest
A as long
B as byte
C as string
End TypeDim tt as typTestdim l as long
l = lenb(tt)dim bt() as byte
redim bt(l-1)
bt(0) = xx
bt(1)=xxx
....
CopyMemory tt, bt(0),l
Type typTest
A as long
B as byte
C as string
End TypeDim tt as typTestdim l as long
l = lenb(tt)dim bt() as byte
redim bt(l-1)
bt(0) = xx
bt(1)=xxx
....
CopyMemory tt, bt(0),l
mybyte() as byte
end typetype b
a as integer
b as double
c as string
end typelet b=a
试试行不行