Hi Paul, >From what you have written, you get the error _before_ the code even hits the thread create part. Although the error says its a Thread error, i do not think it has anything to do with the thread that you are creating or rather before creating the helper class that creates the thread. Is there any code in the initialize sections of any of the units? it seems the error is coming up before any of your code is executed. Could there be a unit in the uses clause that can be doing this? what units do you use? I have had a similar experience with windows 98 when running some applications written in delphi 7 - especially when it uses some custom controls (dev express) for example; which i found out to be caused by changes in the windows API between windows 98 and windows XP (some dlls in the windows\system32 directory) I have been able to "fix" this by compiling my code with an earlier version of delphi (delphi 5 to be presice) and it works fine. So i dont think its your code; PO Box 627 00502 Karen, Nairobi, Kenya. Mobile: +254 722 996532 Fixed: +254 20 2050859 [EMAIL PROTECTED]
_____ From: advanced_delphi@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Bennett Sent: 17 June 2008 2:45 p To: advanced_delphi@yahoogroups.com Subject: [advanced_delphi] TThread Error Hi All, Can anyone help with this one? I have an application written using D7 Ent. which runs fine on XP and 98SE. Currently the application loads its data from a CD, but the powers that be have decided that they would like to network the application and download the data periodically across the LAN. In order to achieve this I have created a small helper class (TAutoDownload) which is owned and created by the main form. This helper class is created during the Form Creation procedure and freed by the Form Destructor. TAutoDownload contains 2 TThread objects, 1) a Timer Thread, and 2) the thread that handles the actual download of the Data Files. Both threads are created as and when required by the Class. The new application works fine when running on XP, but as soon as I try to run it under 98' it crashes with the following error: Error Creating Form: Thread Error: The Parameter is incorrect (87). As far as I can tell this error occurs during the Main Forms Creation (but before any of the FormCreate code executes - ie the code never gets as far as a breakpoint on the first line of the FormCreate procedure). I've done a Google on TThread Errors, Delphi 7 and Win98, but the only hit that seems to be relevant refers to bug in the TThreads destructor method. I have implemented the suggested change, but it has had no effect. Any ideas would be very welcome. TIA Paul.