Dim b1() As Byte
Dim b2() As Byte
Dim b() As Byteb1=......
b2=......b = b1 & b2 ???
解决方案 »
- VB和ORACLE 连接~ 表里面有数据~ 怎么会插不到数据呢????????
- 字符串转换为变量的问题 "vbKeyA" =>vbKeyA
- XP sp2 后 IShellUIHelper 工作不正常?
- 麻烦那位朋友给一份 DES算法的源代码 不要控件,感谢!
- 散分了~~~~
- 直接从vb里关计算机。
- 如何跳过密码验证读取ACCESS中的SQL链接表
- VB中如何得到当前已经注册的ODBC数据源的名称(DSN)。
- 天哪!为什么那么简单的题目竟然没有人知道?
- 大神帮忙:webbrowser控件无法获得新浪微博网页源文件
- 我用WNetAddConnection连接一个网络路径,有时成功有时不成功,为何?
- 如何实现类似画图工具的刷子功能
CopyMemory b(UBound(b1) + 1), b2, UBound(b2) + 1
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)CopyMemory b(0), b1(0), UBound(b1) + 1
CopyMemory b(UBound(b1) + 1), b2(0), UBound(b2) + 1
Destination As Any, _
Source As Any, _
ByVal Length As Long)
Public Function ArrayLink(ByRef a1() As Byte, _
ByRef a2() As Byte, _
ByRef r() As Byte) As Boolean
On Error GoTo REERR
ArrayLink = True
Dim lLength1 As Long, lLength2 As Long, lLength3 As Long
Dim pWritePoint As Long
pWritePoint = 0
lLength1 = UBound(a1) + 1
lLength2 = UBound(a2) + 1
lLength3 = lLength1 + lLength2
ReDim r(lLength3 - 1)
CopyMemory r(pWritePoint), a1(0), lLength1
pWritePoint = lLength1
CopyMemory r(pWritePoint), a2(0), lLength2
Exit Function
REERR:
ArrayLink = False
End FunctionPublic Function ArrayInsert(ByRef a1() As Byte, _
ByRef a2() As Byte, _
ByRef r() As Byte, _
ByVal lStart As Long) As Boolean
On Error GoTo REERR
ArrayInsert = True
Dim lLength1 As Long, lLength2 As Long, lLength3 As Long
Dim pWritePoint As Long
pWritePoint = 0
lLength1 = UBound(a1) + 1
lLength2 = UBound(a2) + 1
lLength3 = lLength1 + lLength2
If lStart > lLength1 Then GoTo REERR
ReDim r(lLength3 - 1)
CopyMemory r(pWritePoint), a1(0), lStart
pWritePoint = lStart
CopyMemory r(pWritePoint), a2(0), lLength2
pWritePoint = pWritePoint + lLength2
CopyMemory r(pWritePoint), a1(lStart), lLength1 - lStart
Exit Function
REERR:
ArrayInsert = False
End FunctionPublic Function ArrayReplace(ByRef a1() As Byte, _
ByRef a2() As Byte, _
ByRef r() As Byte, _
ByVal lStart As Long, _
ByVal lLength As Long) As Boolean
On Error GoTo REERR
ArrayReplace = True
Dim lLength1 As Long, lLength2 As Long, lLength3 As Long
Dim pWritePoint As Long
pWritePoint = 0
lLength1 = UBound(a1) + 1
lLength2 = UBound(a2) + 1
lLength3 = lLength1 + lLength2 - lLength
If lStart + lLength > lLength1 Then GoTo REERR
ReDim r(lLength3 - 1)
CopyMemory r(pWritePoint), a1(0), lStart
pWritePoint = lStart
CopyMemory r(pWritePoint), a2(0), lLength2
pWritePoint = pWritePoint + lLength2
CopyMemory r(pWritePoint), a1(lStart + lLength), lLength1 - lStart - lLength
Exit Function
REERR:
ArrayReplace = False
End FunctionPublic Function ArrayCopy(ByRef aDestination() As Byte, _
ByRef aSource() As Byte, _
Optional ByVal lStart As Long = -1, _
Optional ByVal lLength As Long = -1) As Boolean
On Error GoTo REERR
ArrayCopy = True
If lStart = -1 Then lStart = 0
If lLength = -1 Then lLength = UBound(aSource) + 1
If lStart + lLength > UBound(aSource) + 1 Then GoTo REERR
ReDim aDestination(lLength - 1)
CopyMemory aDestination(0), aSource(lStart), lLength
Exit Function
REERR:
ArrayCopy = False
End Function
CopyMemory b(UBound(b1) + 1), b2, len(b2)