web servisten dönen array of TByteDynArray tibindeki cevabı dosya oluşturmaya çalışıyorum
fakat sadece TByteDynArray Tipinde Dönünce Problem Olmuyor
array of TByteDynArray bu şekilde Döndüğünde her bir değeri için dosya oluşturamıyorum
for I := 0 to Length(Res) - 1 do
begin
ByteArrayToFIle(Res,'D:\'+IntToStr(i)+'.xml');
end;
procedure ByteArrayToFIle( const ByteArray : TByteDynArray;
const FileName : string );
var Count : integer;
F : FIle of Byte;
pTemp : Pointer;
begin
AssignFile( F, FileName );
Rewrite(F);
try
Count := Length( ByteArray );
pTemp := @ByteArray[0];
BlockWrite(F, pTemp^, Count );
finally
CloseFile( F );
end;
end;
array of TByteDynArray Dan Dosya Oluşturmak
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Re: array of TByteDynArray Dan Dosya Oluşturmak
bu sorunu çözen yok mu?
güncelleme:
uses System.Types ekleyin
ByteArray:=deger[0].document_content;
TmpRpt := TMemoryStream.Create;//stream'e kaydet
TmpRpt.Position := 0;
TmpRpt.Write(ByteArray[0], Length(ByteArray));
TmpRpt.SaveToFile('fatura.xml');
//kolay gelsin
güncelleme:
uses System.Types ekleyin
ByteArray:=deger[0].document_content;
TmpRpt := TMemoryStream.Create;//stream'e kaydet
TmpRpt.Position := 0;
TmpRpt.Write(ByteArray[0], Length(ByteArray));
TmpRpt.SaveToFile('fatura.xml');
//kolay gelsin
Haksız bir davada zirve olmaktansa, haklı bir davada zerre olmayı tercih ederim.