AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Array of Integer und crash

Ein Thema von EWeiss · begonnen am 19. Mär 2017 · letzter Beitrag vom 27. Sep 2018
 
EWeiss
(Gast)

n/a Beiträge
 
#31

AW: Array of Integer und crash

  Alt 26. Sep 2018, 13:28
Muss das nochmal aufgreifen..

Habe das Projekt nach 64 Bit umgelegt bekomme aber jetzt fortlaufend "Inaccessible value"
Delphi-Quellcode:
function TAnimateGif.GetPropertyItem(GifImage: LONG_PTR; PropertyID: ULONG; PropertyItemSize: UINT;
  var PropertyItemData: PPropertyItem): GPSTATUS;
begin

  // Daten auslesen
  Result := GDIP_GetPropertyItem(GifImage, PropertyID, PropertyItemSize, PropertyItemData);
end;
Delphi-Quellcode:
function GDIP_GetPropertyItem(Img: LONG_PTR; propId: PROPID; propSize: UINT;
  var buffer: PPROPERTYITEM
): GPSTATUS; stdcall;
begin

  result := GdipGetPropertyItem(Img, propId, propSize, buffer);
end;
bevor GdipGetPropertyItem aufgerufen wird ist der Buffer gefüllt.
Nach dem Aufruf von GdipGetPropertyItem ist der buffer Inaccessible.

Wie immer tritt nur unter 64 Bit auf.

Die Funktion ist diese.
GdipGetPropertyItem: function(Image: LONG_PTR; propId: PROPID; propSize: UINT; var buffer: PPROPERTYITEM): GPSTATUS; stdcall;

Und der Record der..
Delphi-Quellcode:
  PropertyItem = record // NOT PACKED !!
    id : PROPID; // ID of this property
    length : ULONG; // Length of the property value, in bytes
    type_ : WORD; // Type of the value, as one of TAG_TYPE_XXX
    value : Pointer; // property value
  end;
  TPropertyItem = PropertyItem;
  PPropertyItem = ^TPropertyItem;
es kracht dann hier
Delphi-Quellcode:
    // Daten auslesen
    if GetPropertyItem(GifImage, PropertyTagFrameDelay, PropSize, FPropItem) = OK then
    begin
      // Bytearray dimensionieren
      SetLength(Prop, PropItem.Length);
      CopyMemory(@Prop[0], PropItem.value, PropItem.Length);
weil PropItem bzw. vorher schon PropertyItemData nicht zugänglich ist.

PS:
Es hat nichts mit dem setzen der Optimierung zu tun!

gruss
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:24 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz