新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub f_getBigFile()
Dim b(1024& * 1024) As Byte, bb(1024& * 1024) As Byte
strFN = "D:\~1\C_PAN.GHO" '18G 的Ghost文件 ,超出2G, lof(1) 已经取不到值了
t = Timer
Open strFN For Binary As #1
Get #1, , b
Get #1, 1024& * 1024 * 1024, bb ' 在1G 处 取1M 字节
Close #1
'Debug.Print Timer - t
Debug.Print b
Debug.Print bb '"能打印出来和上面不一样说明取到值了"
End Sub
Private Sub Command1_Click()
Call f_getBigFile
End Sub