最好是在不读取原文件内容的前提下。
请给出示例代码。
谢谢!!

解决方案 »

  1.   

    把 二进制内容 转换成BASE64编码 就不回破坏了
      

  2.   

    下班了 如果你对BASE64赶兴趣 看看  http://jinesc.6600.org/myweb/disp.asp?idd=1174&room=1030
      

  3.   

    BASE64就是把任何文件转换成文本格式的编码  如果需要就分离出来再解码
      

  4.   

    Private Sub Command1_Click()
    Open "C:\My Documents\zjm.txt" For Binary Access Write As #1
    Put #1, LOF(1) + 1, "rrrrr"
    Close #1
    End Sub
      

  5.   

    是要增加txt文件的大小而不容易被发觉。
    哈。。
      

  6.   

    //是要增加txt文件的大小而不容易被发觉增加文件大小可以这样:
    Option Explicit
    Const OFS_MAXPATHNAME = 128
    Const OF_CREATE = &H1000
    Const OF_READ = &H0
    Const OF_WRITE = &H1
    Private Const FILE_END = 2
    Private Type OFSTRUCT
            cBytes As Byte
            fFixedDisk As Byte
            nErrCode As Integer
            Reserved1 As Integer
            Reserved2 As Integer
            szPathName(OFS_MAXPATHNAME) As Byte
    End Type
    Private Declare Function OpenFile Lib "kernel32" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
    Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
    Private Declare Function GetFileSize Lib "kernel32" (ByVal hfile As Long, lpFileSizeHigh As Long) As Long
    Private Declare Function SetFilePointer Lib "kernel32" (ByVal hfile As Long, ByVal lDistanceToMove As Long, lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long
    Private Declare Function SetEndOfFile Lib "kernel32" (ByVal hfile As Long) As LongPrivate Sub Command1_Click()
        Dim OF As OFSTRUCT
        Dim i As Long
        Dim hfile As Long
        hfile = OpenFile("e:\mc\1.txt", OF, OF_READ Or OF_WRITE)
        i = SetFilePointer(hfile, 100, ByVal 0&, FILE_END)
        SetEndOfFile hfile
        CloseHandle hfile
    End Sub至于不容易被发觉,恐怕很难实现,原因是txt文件并没有文件结束标志