(Gast)
n/a Beiträge
|
TFIleStream Read füllt Buffer nicht
23. Mär 2017, 23:19
Neues Problem neues Thema.
Mein Fortschritt
Delphi-Quellcode:
if (GetPngAnimation(gp.PngList[SelectedIndex], anih)) then
begin
//if FOpen(PWideChar(wsFile), 0, 0, hFileIn) = 0 then
FileStream := TFileStream.Create(wsFile, fmOpenRead);
if FileStream.Handle <> 0 then
begin
DC := CreateIC(' DISPLAY', nil, nil, nil);
ImgHDC := CreateCompatibleDC( DC);
hDIB := SKAERO_CreateDIBSection(ImgHDC, anih.Width * anih.Frame, anih.Height, 32);
SelectObject(ImgHDC, hDIB);
if GDIP_CreateFromHDC(ImgHDC, Graphics) = OK then
begin
BufferSize := FileStream.Size - anih.offset - sizeof(anih) + 1;
SetLength(sBuffer, BufferSize);
FileStream.Seek(anih.offset - 1, soFromBeginning);
FileStream. Read(sBuffer, BufferSize);
//if FGetAt(FileStream.Handle, anih.offset - 1, sBuffer) = S_OK then
//begin
FileStream.Read füllt den Buffer nicht fehlt noch was, oder habe ich was übersehen ?
gruss
|
|
Zitat
|