Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference to class procedure

I'm have such static class procedure in my record:

TRec = record
  class procedure Proc; stdcall; static;
end;

Now I need array of such class procedures in my record:

TRec2 = record
  Procs: array of TClassProcStdcallStatic;
end;

This is possible and how to determine TClassProcStdcallStatic?

like image 315
Alex Egorov Avatar asked Feb 19 '15 07:02

Alex Egorov


1 Answers

Define it like this:

type
  TClassProcStdcallStatic = procedure; stdcall;

The static keyword means that the method has no Self pointer and is a single pointer function type. As opposed to of object double pointer function types.

like image 56
David Heffernan Avatar answered Sep 21 '22 12:09

David Heffernan