代码
Fn GetMaxFileVersion theMaxFile =
(
local versionFloat,theBinStream,keyWord,notFind,textFromBin,binEnd
versionFloat
= 0
if isMaxFile theMaxFile do
(
theBinStream
= fopen theMaxFile "r"
keyWord
= "Version:"
notFind
= true
textFromBin
= ""
fseek theBinStream
0 #seek_end
binEnd
= ftell theBinStream
fseek theBinStream
0 #seek_set

while (ftell theBinStream < binEnd ) and notFind do
(
textFromBin
= ReadString theBinStream
if textFromBin == "V" do
(
for i = 1 to keyWord.Count - 1 do textFromBin += ReadString theBinStream as string
)
if keyWord == textFromBin do
(
versionString
= ""
for i = 1 to 5 do versionString += ReadString theBinStream as string
versionFloat
= versionString as float
notFind
= false
)
)
FClose theBinStream
)
versionFloat
)

GetMaxFileVersion(getOpenFileName())

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2021-12-13
  • 2022-01-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-12-27
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案