Hi
Yes, you just pass in a dummy variable, when not used.
No, you cannot change the callback signature,
IT HAS TO BE:TAsyncProc = procedure (aData: ptrint) of object;
A #2:
'Application' lives in unit 'Forms', basically the GUI apparatus of Lazarus.
If you want to use it in another unit, it's possible if you include unit 'Forms' in the other unit's uses clause...
BUT ...if you do MVP or other sort of programming, where you separate Business logic and user interface, you might not want to have GUI-stuff in your backend / business-end...
One solution is to define a Method with the same signature as 'Application.QueueAsyncCall' and then at runtime assign your alias method like this:
/// this is your other unit ///
var
MyQAC: TQac;
implementation
procedure TForm1.FormCreate(Sender: TObject);
begin
MyQAC:= @Application.QueueAsyncCall;
end;
Then you don't have to have 'Forms' in your other unit and you can use it by calling
MyQAC(@MyClass.HandleAC,SomePtrintParam);
HTH
Regards Benny