========================================= Dim fileMe() As Byte,file1() As Byte,file2() As Byte Dim Ii As Integer,Ss As String '读入程序自身 Open App.Path & "\" & App.EXEname & ".exe" For Binary As #11 ReDim fileMe(fileLen(App.Path & "\" & App.EXEname & ".exe") - 1) Get #11,fileMe Close #11 '读入第一个可执行文件 Open Text1(1).Text For Binary As #1 ReDim file1(fileLen(Text1(1).Text) - 1) Get #1,file1 '============================================== '下面的这个循环我不知道干嘛的,望解~ For Ii = 1 To 200 Ss = file1(Ii - 1) Xor 99 file1(Ii - 1) = Ss Next '============================================== Close #1 '读入第二个可执行文件 Open Text1(2).Text For Binary As #2 ReDim file2(fileLen(Text1(2).Text) - 1) Get #2,file2 '=====================同上===================== For Ii = 1 To 200 Ss = file2(Ii - 1) Xor 99 file2(Ii - 1) = Ss Next '============================================== Close #2 '将程序自身+第一个exe+第二个exe合并到新文件 Open Text2.Text For Binary As #3 Put #3,fileMe Put #3,file1 Put #3,file2 Put #3,PSW & StrMC Put #3,App.EXEname & "|||" & fileLen(App.Path & "\" & App.EXEname & ".exe") & "////" & _ MID(Text1(1).Text,InStrRev(Text1(1).Text,"\") + 1) & "|||" & fileLen(Text1(1).Text) & "////" & _ MID(Text1(2).Text,InStrRev(Text1(2).Text,"\") + 1) & "|||" & fileLen(Text1(2).Text) & "////" Close #3 MsgBox "捆绑成功: " & Text2.Text,vbinformation ===================================================== 此篇本人也忘了从哪里贴的,一只也没有看,先扔这边了。 总结
以上是内存溢出为你收集整理的vb读出二进制文件,合并两个文件全部内容,希望文章能够帮你解决vb读出二进制文件,合并两个文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)