前面我提的问题很乱,我试了,发现,问题首先在发送 测试了一下,发现读了很多次,如下,前两次读的大小是32769,后面是9741 $32769$32769$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741$9741 string ls_filename ls_filename = filename//filename是要发送的文件的名字 integer li_FileNum, loops, i long flen, bytes_read, new_pos blob b,tot_b // Set a wait cursor SetPointer(HourGlass!) // Get the file length, and open the file flen = FileLength(ls_filename) li_FileNum = FileOpen(ls_filename, & StreamMode!, Read!, LockRead!) // Determine how many times to call FileRead IF flen > 1020 THEN IF Mod(flen, 1020) = 0 THEN loops = flen/1020 ELSE loops = (flen/1020) + 1 END IF ELSE loops = 1 END IF // Read the file new_pos = 1 FOR i = 1 to loops tot_b = blob("data") bytes_read = FileRead(li_FileNum, b) tot_b = tot_b + b Write_Data = tot_b WriteMsg() NEXT FileClose(li_FileNum) return 0 在下面的一句:如果我控制b的大小是不是就可以控制每次读取的大小 例如: b = blob(space(1020)) 但是好像不行 bytes_read = FileRead(li_FileNum, b) |