Threading in a visualplugin

I have a visual plugin (Delphi) and like to use a TTask to loop through all available (delphi) plugins to see if they have a certain interface.
Inside those plugins message and updates to the progressbar are generated to show in the Host visual plugin. For that purpose I have made a Progress interface. As long as I don’t use TTask everything works fine.
Because this process takes a lot of time I would like to put it in a TTask so the user has a responsive application.
Also I like to cancel the tread by pushing a button. So what do I need to do to get it working?

Do I correctly understand that you want to add host reaction when a button inside plugin was pressed?

No the other way around. In the host a user clicks the cancel button and then the plugin should stop do calculations.

When I use a TTask mu progressbar is not responding.

when you pressed the button, host should call the plugin method that should set Terminated property (or other one).
Calculation inside plugin should periodically check value of that property and break calculation if that property is set