On Error GoTo ErrLabel
iFreeFile = FreeFile
Open FileName For Binary As #iFreeFile
Get #iFreeFile, &H43, bytFile
Get #iFreeFile, &H9D, bytVer
Get #iFreeFile, &H15, bytDB_ID
Get #iFreeFile, &H5, sFileFlag
Close #iFreeFile
If sFileFlag <> "Delphi" Then
MsgBox "没有找到"
GoTo Endlabel
End If
iFreeFile = FreeFile
Open FileName For Binary As #iFreeFile
Get #iFreeFile, &H43, bytFile
Get #iFreeFile, &H9D, bytVer
Get #iFreeFile, &H15, bytDB_ID
Get #iFreeFile, &H5, sFileFlag
Close #iFreeFile
If sFileFlag <> "Delphi" Then
MsgBox "没有找到"
GoTo Endlabel
End If
解决方案 »
- delphi 的comparetext比较汉字?
- delphi中如何将chart图表的结果添加到quickreport打印报表中?
- 怎么申请一个2维数组例如a[60000][4],我直接申请静态的溢出了
- 请问怎么删除ListView中选定的行?
- 那位大哥能给小弟讲一讲校园一卡通的核心技术,和具体的系统分析???高分答谢
- 请问vb.net与delphi比较哪个更好?
- 有关窗体的问题,急救!
- MIDI可以作为资源编译进EXE吗?如果可以我应该怎么做?谢谢了!
- 我的Delphi运行不起来!!!!
- delphi 三层socket 查询报错insufficient memory for this operation
- 请问可不可以在delphi里面同时打开两个工程??
- 问一个极其傻瓜的问题!
file:Tfile;
ifreefile:string;
begin
try
ifreefile:=freefile;
file:=openfile(ifreefile,....);
// 下面的不知什么意思了,呵呵
closefile(file);
except
end;
end;
Dim bytVer(2) As Byte
Dim bytDB_ID As Byte
Dim bytFile(39) As Byte
Dim iFreeFile As Integer
Dim sFileFlag As String * 15
iFreeFile = FreeFile '得到一個空閑的文件號
Open FileName For Binary As #iFreeFile '以二進制方式打開文件
Get #iFreeFile, &H43, bytFile '從第67字節開始,讀入len(bytFile)個字節的數據至
bytFile
Get #iFreeFile, &H9D, bytVer
Get #iFreeFile, &H15, bytDB_ID
Get #iFreeFile, &H5, sFileFlag '同上
Close #iFreeFile '關閉文件
If sFileFlag <> "VB" Then
MsgBox "没有找到"
GoTo Endlabel
End If