D
dxiaoliang
Unregistered / Unconfirmed
GUEST, unregistred user!
Function TForm1.Jmf_AddtoFile(SourceFile,PassWord,TargetFile:String):Boolean;var Target:TFileStream; Source:TFileStream; MyFileSize,PassWordSize:integer; ys: TCompressionStream; sor: integer;//不能被整除的余数 i:integer; sorsize:integer; intcount:integer; intbuf: integer; outbuf: integer; xxx:array of Byte; //bufointer;Begin Try Source:=TFileStream.Create(SourceFile,fmOpenRead or fmShareDenyNone ); Target:=TFileStream.Create(TargetFile,fmCreate); sorsize:= source.Size; setlength(xxx,sorsize); Try sorsize:= source.Size; setlength(xxx,sorsize); Source.Seek(0,soFrombeginning); Source.Read(xxx,sizeof(xxx));//不能够获得数据, for i:=0 to Source.Size do begin xxx:=xxx xor $FF; end; Target.WriteBuffer(xxx,sizeof(xxx));动态数组是否写的有问题高手帮忙看看啊