Thema: Delphi Pointer is TObject?

Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

Re: Pointer is TObject?

  Alt 3. Dez 2007, 16:12
Hi,

Habs jetzt so gemacht und das funktioniert bisher ganz gut:

Delphi-Quellcode:
function IsObject(p: Pointer): Boolean;
begin
  Result := TObject(p).ClassType <> nil;
end;
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat