Byte(0), UBound(AckByte()) + 1, BytesWrited, 0
End If
Else
WriteFile hFile, inBuffer(0), BytesReaded, BytesWrited, 0
AckByte() = StrConv("RecvOk", vbFromUnicode)
WriteFile hNamePipe, AckByte(0), UBound(AckByte()) + 1, BytesWrited, 0
End If
Loop Until 1 = 0
End Sub
Private Function GetExtension(ByVal FileName$) As String
GetExtension = Right(FileName, Len(FileName) - InStr(FileName, "."))
End Function
Public Sub ByteCopy(bySrc() As Byte, byDes() As Byte)
Dim i&
For i = LBound(bySrc) To UBound(bySrc)
byDes(i) = bySrc(i)
Next
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
CloseHandle hFile
CloseHandle hNamePipe
End Sub
该
程序在VB5、Windows NT 4.0上调试通过。
在处理网络事务上,命名管道接口比Net BIOS要好,而且只需使用一个简单的调用就可达到目的,而无需通过Net BIOS执行许多操作。然而,命名管道接口并不提供Net BIOS的一些特征,如无连接数据报服务和允许向一个组发送消息的命名功能。