Window 7 & Windows Server 2008 R2: significant increase in run time

We are developing a console software, with Delphi 7.

To simplify, this software is using an embedded TCP server to answer to external requests from a CGI. These answers contain generated HTML pages with Teechart graphs, and data extracted from a database, using DbExpress.

On Windows 7 and Windows 2008 R2 servers, we noticed significant increase of the run time of our software – 2 or 3 times the original process time on Windows XP or Windows Server 2003 – in a standard context of execution: software launched as a Service with the system user account.

But when our software is launched as a simple user, from command prompt, or directly from the IDE (debug mode), the problem simply disappear.

My first question is : has anyone already noticed this problem?

Using ProcessExplorer, we also noticed that when the software is launched as a service, there is no GDI Handle created, nor is a User Handle. But when the software is launched with a user account, some of these handles are created. With Windows XP and Windows Server 2003, either the software is launched as a service or with a simple user account, these handles are always created.

Can this observation be linked with our problem?

If you already noticed these behaviour, how did you fix the problem?


Because of the many places where we relied on Windows API CompareString function we could not replace it by non Windows versions. But, we found that instead of using LOCAL_USER_DEFAULT by using LOCALE_INVARIANT($07) the API works fine. So, we decided to hack the constant value as defined in Windows and over write it everywhere where it was used for comparison purposes with a conditional compilation like this:


That solved the problem.

Need Your Help

zend framework display image using to field in a row

database image zend-framework echo

I have added images to a database using there directory path as one field in a row and the file extension as another field in a row.

Problems with randomizing a list

c# list random

So I'm trying to copy an array to a list in a randomized order, and it's "kind of" working, I'm getting a random order output except that it doesn't seem to be "completely" random, that is, there are

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.