I have a situation like the following:
interface
type
IMyInterface = interface
[GUID]
procedure MyProcedure; stdcall;
end;
TMyOBject = class(TInterfacedObject, IMyInterface)
procedure MyProcedure; virtual; stdcall; abstract;
end;
TDerivedObject = class(TMyOBject)
procedure MyProcedure; override; stdcall;
procedure SomeOtherProcedure;
end;
implementation
uses
System.Threading;
procedure TDerivedObject.MyProcedure;
begin
//DoStuff;
end;
procedure TDerivedObject.SomeOtherProcedure;
begin
TTask.Run(MyProcedure); //Error: Run can't be called with this parameter
end;
The compiler says I can't use a TTask to run MyProcedure. It is an error to try and cast MyProcedure to a TProc. My questions are 1) What type is MyProcedure? 2) How would I go about discovering the type of MyProcedure?
Thanks