Ich habe gerade kein Delphi hier, aber mit der
Unit hole ich mir normalerweise MetaClasses/
VMT.
Delphi-Quellcode:
unit uRttiHelpers;
interface
type
PClass = ^TClass;
PSafeCallException =
function(self : TObject;
exceptObject : TObject;
exceptAddr : Pointer) : HResult;
PAfterConstruction =
procedure(self : TObject);
PBeforeDestruction =
procedure(self : TObject);
PDispatch =
procedure(self : TObject;
var message);
PDefaultHandler =
procedure(self : TObject;
var message);
PNewInstance =
function(self : TClass) : TObject;
PFreeInstance =
procedure(self : TObject);
PDestroy =
procedure(self : TObject; outerMost : Shortint);
PVmt = ^TVmt;
TVmt =
packed record
SelfPtr : TClass;
IntfTable : Pointer;
AutoTable : Pointer;
InitTable : Pointer;
TypeInfo : Pointer;
FieldTable : Pointer;
MethodTable : Pointer;
DynamicTable : Pointer;
ClassName : PShortString;
InstanceSize : PLongint;
Parent : PClass;
SafeCallException : PSafeCallException;
AfterConstruction : PAfterConstruction;
BeforeDestruction : PBeforeDestruction;
Dispatch : PDispatch;
DefaultHandler : PDefaultHandler;
NewInstance : PNewInstance;
FreeInstance : PFreeInstance;
Destroy : PDestroy;
end;
function GetVmt(classReference : TClass) : PVmt;
implementation
function GetVmt(classReference : TClass) : PVmt;
begin
Result := PVmt(classReference);
Dec(Result);
end;
end.
Oki, hab's gerade wieder installiert ( wurde auch Zeit
) und wie ich es mir dachte gates.
edit: lol, mein Copy and Waste Knopf muss wohl kaputt sein