掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
バイナリファイルの置き換えをするには? (ID:112284)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
私ならこうします。 Dim i As Long Dim bytGetData As Byte Dim bytRep(2) As Byte Dim fn1 As Integer Dim fn2 As Integer Dim strFile1 As String Dim strFile2 As String bytRep(0) = &H34 bytRep(1) = &H55 bytRep(2) = &H66 strFile1 = App.Path & "\bin.dat" strFile2 = App.Path & "\bin.tmp" fn1 = FreeFile Open strFile1 For Binary Access Read As #fn1 fn2 = FreeFile Open strFile2 For Binary Access Write As #fn2 For i = 1 To LOF(fn1) Get #fn1, , bytGetData If bytGetData = &H10 Then Put #fn2, , bytRep Else Put #fn2, , bytGetData End If Next Close #fn1 Close #fn2 Kill strFile1 Name strFile2 As strFile1
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.