Einzelnen Beitrag anzeigen

schand99

Registriert seit: 7. Nov 2013
Ort: Südtirol
43 Beiträge
 
Delphi XE8 Enterprise
 
#7

AW: Zugriffsverletzung

  Alt 25. Jul 2016, 12:22
Der Fehler wird in "function SysFreeMem(P: Pointer): Integer" aus Getmem.inc ausgelöst.

Delphi-Quellcode:
function SysFreeMem(P: Pointer): Integer;
asm
{$ifdef CPU386}
{---------------32-bit BASM SysFreeMem---------------}
  {On entry:
    eax = P}

  {Get the block header in edx}
  mov edx, [eax - 4]
  {Is it a small block in use?}
  test dl, IsFreeBlockFlag + IsMediumBlockFlag + IsLargeBlockFlag
  {Save the pointer in ecx}
  mov ecx, eax
  {Save ebx}
  push ebx
  {Get the IsMultiThread variable in bl}
  mov bl, IsMultiThread
  {Is it a small block that is in use?}
  jnz @NotSmallBlockInUse
  {Do we need to lock the block type?}
  test bl, bl
  {Get the small block type in ebx}
  mov ebx, TSmallBlockPoolHeader[edx].BlockType
in dem letzten Befehl mov ebx, TSmallBlockPool... stürzt das Programm ab. Deshalb hatte ich schon mit GetMem und FreeMem versucht, den Platz für den Pointer 'Refr' zu reservieren und manuell wieder freizugeben.
Könnte es sein, dass die 32 Bit DLL auf einem 64 Bit Sytem nicht so funktioniert wie sie soll? Als Zielplattform habe ich zwar Win32 eingestellt, aber man weiß ja nie...
  Mit Zitat antworten Zitat