Einzelnen Beitrag anzeigen

cdkiller

Registriert seit: 23. Jul 2004
23 Beiträge
 
#3

Re: Filestream - Add a File to an other File

  Alt 27. Jul 2004, 09:55
okay,

this is my code:

it should add a dll file to an other file.

Delphi-Quellcode:
var
fs,fs2 : TFileStream;
Buffer: Pointer;
Buffer2: Pointer;
filename: string;
begin
if OpenDialog1.Execute then filename := OpenDialog1.FileName;
fs := TFileStream.Create(filename, fmOpenReadWrite);
fs.ReadBuffer(Buffer^,Sizeof(Buffer^));
fs.Seek(0,soFromEnd);

fs2 := TFilestream.Create('sf_wrapper.dll', fmOpenRead);
fs2.ReadBuffer(Buffer2^,Sizeof(Buffer2^));
fs.WriteBuffer(Buffer2^,Sizeof(Buffer2^));

fs.Free;
fs2.Free;
where is the error or can you fix it ?

[edit=sakura] No pushing within 48 hours Mfg, sakura[/edit]
  Mit Zitat antworten Zitat