Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: Running a VCL app on Windows Server 2008 R2



Permlink Replies: 2 - Last Post: Sep 20, 2017 4:26 PM Last Post By: Remy Lebeau (Te... Threads: [ Previous | Next ]
Jeff Wilhite

Posts: 3
Registered: 6/17/99
Running a VCL app on Windows Server 2008 R2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2017 2:05 PM
We recently upgraded from XE3 to Tokyo, and we noticed that our VCL apps won't run on Windows Server 2008 R2 (and possibly Windows 7). I get a message that it can't find SHCORE.DLL when we start the app. It looks like VCL is using some of the new window-scaling functionality available in the SHCORE.DLL in Windows 8.1 which doesn't exist in earlier Windows versions.

So, is it possible for us to still deploy VCL apps that run on Windows 7 and Server 2008 R2? I experimented with adding SHCORE.DLL to the delay-load list and setting the "Scaled" property to false on any forms, but I'm wondering if there is a global setting somewhere or a more official way to deploy VCL apps on older Windows versions.

Thanks,
Jeff Wilhite
Remy Lebeau (Te...


Posts: 8,641
Registered: 12/23/01
Re: Running a VCL app on Windows Server 2008 R2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 20, 2017 4:31 PM   in response to: Jeff Wilhite in response to: Jeff Wilhite
Jeff Wilhite wrote:

We recently upgraded from XE3 to Tokyo, and we noticed that our VCL
apps won't run on Windows Server 2008 R2 (and possibly Windows 7). I
get a message that it can't find SHCORE.DLL when we start the app. It
looks like VCL is using some of the new window-scaling functionality
available in the SHCORE.DLL in Windows 8.1 which doesn't exist in
earlier Windows versions.

That has been arouns since at least Seattle. I have the following
comment on RSP-13099 (https://quality.embarcadero.com/browse/RSP-13099):

Odd considering that the Winapi.ShellScaling unit delay-loads
GetDpiForMonitor() at runtime, so it should not be static linking at
compile-time. Also, Vcl.Forms.hpp includes Winapi.ShellScaling.hpp,
which contains a "#pragma comment(lib, shcore)" statement to
static-link to shcore.dll, which implements GetDpiForMonitor().

So, is it possible for us to still deploy VCL apps that run on
Windows 7 and Server 2008 R2?

Not if the apps are static-linking to shcore.dll. I would have
expected Embarcadero to have the VCL dynamic-link/delay-load to such a
newer DLL. They usually do. Maybe this is an oversight that still
hasn't been fixed yet.

I experimented with adding SHCORE.DLL to the delay-load list

That would have been my first move, too. Are you saying it doesn't
work?

and setting the "Scaled" property to false on any forms

That wouldn't effect static linking in any way.

but I'm wondering if there is a global setting somewhere or a more
official way to deploy VCL apps on older Windows versions.

I don't know. I would suggest maybe commenting the #pragma in
Winapi.ShellScaling.hpp and see if it makes any difference. If not,
can you please file a new bug report in Quality Portal for this issue?

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 8,641
Registered: 12/23/01
Re: Running a VCL app on Windows Server 2008 R2
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 4:26 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
A user in another forum posted the following to this same issue:

I solved exactly the same issue by restoring the default ProjectPCH1.h file. (as file and cbproj-config-entries)

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02