Autor Beitrag
Siluro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Do 28.09.06 15:48 
Hi,
ich brauch da mal ein wenig Hilfe und zwar muss ich den Inhalt einer Datei Byteweise auslesen und jedes Byte Bitweise verändern können. Ich brauch nicht unbedingt ne komplette Lösung, aber wenn mir jemand ein paar Funktionen verraten könnte, mit denen sich sowas realisieren lässt, wäre ich wirklich Dankbar. Ich finde da irgendwie nichtmal nen Ansatz.

Danke schonmal im Vorraus.
chrisw
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 439
Erhaltene Danke: 3

W2K
D7
BeitragVerfasst: Do 28.09.06 15:53 
Das könnte Dir helfen !


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
var f : File of Byte;
    b : Byte;
begin
  try
    Assignfile(f,'c:\mydat.txt');
  except
    showmessage('Datei nicht vorhanden !');
    exit;
  end;
  Reset(f);
  while not eof(f) do
  begin
    Read(f, b);
    showmessage(Char(b));  //hier b bit- /byteweise verändern 
  end;
  CloseFile(F);

end;



Chris

_________________
Man sollte keine Dummheit zweimal begehen, die Auswahl ist schließlich groß genug.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Do 28.09.06 16:18 
oder probiermal die Forumssuche! das thema hab ich nämlich auch schon mal gefragt! ;-)

mfg el

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Siluro Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Fr 29.09.06 21:26 
Hi,
vielen Dank für eure Hilfe, habs geschafft.
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Fr 29.09.06 21:42 
Kannst es auch mit TFileStream machen!