Ver Mensaje Individual
  #2  
Antiguo 31-01-2009
poyo poyo is offline
Miembro
 
Registrado: ene 2009
Posts: 47
Reputación: 0
poyo Va por buen camino
para tener en cuenta

me olvidaba de algo importantísimo:
el código que puse arriba es para Delphi 2009...

En esta versión a la vmt han tocado. el system.pas dice:

Código Delphi [-]
{ Virtual method table entries }
  vmtSelfPtr           = -88;
  vmtIntfTable         = -84;
  vmtAutoTable         = -80;
  vmtInitTable         = -76;
  vmtTypeInfo          = -72;
  vmtFieldTable        = -68;
  vmtMethodTable       = -64;
  vmtDynamicTable      = -60;
  vmtClassName         = -56;
  vmtInstanceSize      = -52;
  vmtParent            = -48;
  vmtEquals            = -44 deprecated 'Use VMTOFFSET in asm code';
  vmtGetHashCode       = -40 deprecated 'Use VMTOFFSET in asm code';
  vmtToString          = -36 deprecated 'Use VMTOFFSET in asm code';
  vmtSafeCallException = -32 deprecated 'Use VMTOFFSET in asm code';
  vmtAfterConstruction = -28 deprecated 'Use VMTOFFSET in asm code';
  vmtBeforeDestruction = -24 deprecated 'Use VMTOFFSET in asm code';
  vmtDispatch          = -20 deprecated 'Use VMTOFFSET in asm code';
  vmtDefaultHandler    = -16 deprecated 'Use VMTOFFSET in asm code';
  vmtNewInstance       = -12 deprecated 'Use VMTOFFSET in asm code';
  vmtFreeInstance      = -8 deprecated 'Use VMTOFFSET in asm code';
  vmtDestroy           = -4 deprecated 'Use VMTOFFSET in asm code';

  vmtQueryInterface    = 0 deprecated 'Use VMTOFFSET in asm code';
  vmtAddRef            = 4 deprecated 'Use VMTOFFSET in asm code';
  vmtRelease           = 8 deprecated 'Use VMTOFFSET in asm code';
  vmtCreateObject      = 12 deprecated 'Use VMTOFFSET in asm code';

entonces, para versiones anteriores, al record TVmt hay que comentarle lo siguente:
equals : pointer;
GetHashCode : pointer;
ToString : pointer;

como verán arriba, hay unas cosas con offset positivo que todavía no las pusimo en el TVmt...
también desconozco que son los punteros nuevos.

se escuchan sugerencias
Responder Con Cita