Autor Beitrag
Xabitire
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 114

Win Xp, Win Vista
D6 PE, D7 PE
BeitragVerfasst: Sa 24.11.07 20:23 
Hi Leute :D,

Also ich würd gern mit der Funktion ReadBinaryData

ausblenden Delphi-Quelltext
1:
(function ReadBinaryData(const Name: Stringvar Buffer; BufSize: Integer): Integer;)					


eine X-beliegige Datei aus der Registry in ein array of byte laden! Allerdings weiß ich nicht welchen Datentyp dabei die Variable Buffer haben muss. Mit byte hab ichs natürlich schon versucht, aber das hat irgendwie nicht funktioniert? :gruebel:

Hoffe, das geht überhaupt!?

THX Schonmal

MFG Blackbird8690
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 24.11.07 20:36 
var buffer heißt, dass eine beliebige Variable genutzt werden kann.

Für Puffer jeglicher Art hat sich hierbei folgendes bewährt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var
    buf: array of Byte;
begin
    SetLength(buf, DataSize);
    ReadBinaryData(Name, @buf[0], DataSize);
    //Mach was mit Buf
end;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 24.11.07 20:38