Delphi's multi-threaded application built into Vista and will not work in XP

I'm really at a standstill.

I am running delphi 2007 on Vista. I have created many applications and run them in XP without any problems. This latest application was supposed to use threads. I am sure my code is correct. It works fine on Vista, but when I run it on XP (tried several computers), my program seems to be lagging (and os 32 bit, XP sp3 and Vista sp1, dotnet v2). Best example: if I disable the serial port, my comets will continue to work, etc.

I installed delphi on my xp machine and ran my program while delphi was working. Like that, I ran it from exe, built into Vista. Then everything was fine. Close delphi and comport will start to lag again.

If I unplug and replace the flash drive, coms is gaining momentum again.

I want to create an application on my xp-based machine, but I mean a million third-party components, which makes it a real mission to configure.

Oh fyi, I created a simple application with only main stream and content. The same problem. All comthread will fetch data with comport. Not even displaying it, I used a serial port monitor in the background to check for lag.

Any suggestions are welcome.

Quick Edit OK: An XP computer has just been created. I opened msn messenger and the program works fine. I clearly lack settings ...

+4
source share
2 answers

If Sleep used in your threads (hence my comment / request for your question), you should use timeBeginPeriod to indicate the desired resolution. As you have already figured out, no matter where you call it; may be the main thread or even a completely different application.

See thread on the embarcadero forums, and of course the documentation (notes) on MSDN.

+4
source

Is your OS installed on two different PCs? I think one of your computers has a real dual-core processor (one that has XP), and the other (Vista) has a single-core processor. Sometimes a multi-threaded application finds its problem when working on a true multi-core processor. The Delphi debugger sometimes changes the proximity of the processor, so it can work on the debugger, but not outside. Another opportunity to check: try your software under XP with the proximity settings for only one processor. I have seen this before. But this is probably something else since you said you tried your SW on multiple PCs.

+1
source

All Articles