I've created an application for Symbol MC9190 with uscanner.pas. This object (declared as scanner := TStanner) runs in another thread. When I start a form, TScanner object will be started. After closing the form I use this procedure:
{$IFDEF LCLWinCE}
if scanner <> nil then
scanner.Terminate;
{$ENDIF LCLWinCE}
But I still can use the scanner on the terminal. When I open the form again, the application comes with this message:
Error Scanning
Code = 25
It wants to start the thread but couldn't do it, because it already running.
How can I stop the thread and started again by opening a form?