提供点思路
传送文件用WINSOCK控件
分割文件用open(read、write)file
这是我从特定文件取小段数据的例子
Private Function SQLt()
Dim a, b, c, d, e, f, g, s As Long
Dim lpBuffer As Byte
Dim Apath, Strsql, Strv, Strx, Stry As String
Dim i As Integer
Dim Sina As Single
For i = 0 To 15
e = CLng(i + High * 66 + INindex * 8)
Apath = App.Path & "\tempr.prn"
a = CreateFile(Apath, GENERIC_READ, FILE_SHARE_READ, ByVal 0&, OPEN_EXISTING, 0, 0)
d = SetFilePointer(a, e, 0, FILE_BEGIN)
f = ReadFile(a, lpBuffer, 8, c, ByVal 0&)
If c <> 8 Then GoTo Err
Strv = Chr(lpBuffer)
Strsql = Strsql + Strv
Next i
CloseHandle (a)
Strx = Trim(Left(Strsql, 8))
Stry = Trim(Right(Strsql, 8))
Sina = Text8(INTa).Text - Int(Text8(INTa).Text * 200) / 200
SQLt = Strx + Sina / 0.005 * (Stry - Strx)
Err:
End Function
我也用过这种方法储存图片文件
应该是可行的,当然办法比较笨了一点
传送文件用WINSOCK控件
分割文件用open(read、write)file
这是我从特定文件取小段数据的例子
Private Function SQLt()
Dim a, b, c, d, e, f, g, s As Long
Dim lpBuffer As Byte
Dim Apath, Strsql, Strv, Strx, Stry As String
Dim i As Integer
Dim Sina As Single
For i = 0 To 15
e = CLng(i + High * 66 + INindex * 8)
Apath = App.Path & "\tempr.prn"
a = CreateFile(Apath, GENERIC_READ, FILE_SHARE_READ, ByVal 0&, OPEN_EXISTING, 0, 0)
d = SetFilePointer(a, e, 0, FILE_BEGIN)
f = ReadFile(a, lpBuffer, 8, c, ByVal 0&)
If c <> 8 Then GoTo Err
Strv = Chr(lpBuffer)
Strsql = Strsql + Strv
Next i
CloseHandle (a)
Strx = Trim(Left(Strsql, 8))
Stry = Trim(Right(Strsql, 8))
Sina = Text8(INTa).Text - Int(Text8(INTa).Text * 200) / 200
SQLt = Strx + Sina / 0.005 * (Stry - Strx)
Err:
End Function
我也用过这种方法储存图片文件
应该是可行的,当然办法比较笨了一点
解决方案 »
- vb如何将Activex编译成dll
- 如何获得激活控件的信息
- 有于水晶报表
- Either BOF or EOF is True,or the Current record has been deleted. Requested operation or requires a current record.
- 如何通过VB6编程,向要关闭的那个程序(不是自己编写的程序)的主窗口投递一条WM_CLOSE消息?
- 我正在设计一个ftp上传程序,关于放置目录文件信息位置的问题
- 不用时钟控件,如何解决窗口焦点问题?
- ws.Range("A1:m16").Copy Destination:=ws.Cells(iRow, 1) 请问错在那里?
- vb 控制两台打印机
- 如何从数据库中获取记录?
- win2000里面都有系统日志(用事件查看器可以看到),我怎么才可以读取那些日志呢?
- 如果是高手,会很轻易的得到这个分数
呀,wxy_xiaoyu(☆然也☆╭∩╮(︶︿︶)╭∩╮) 的信誉值不错啊