Discussion:
Delphi and Citrix issue
(too old to reply)
Levend Sener
2005-12-27 17:32:52 UTC
Permalink
Hi all,

I have a Delphi & Citrix related issue:

As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode" (sorry, I am not a a Citrix expert,
hope this is accurate ;-) ). This then causes some serious performance
issues. The underlying infrastructure is a blade server which slows extremly
down (nearly not being responsive anymore) when 40+ users are connected to
it using this Delphi/Oracle C/S app, causing the admins to reboot the
server.

Any idea how to prevent/circumvent this ?

TIA,
Levend.
Craig Stuntz [TeamB]
2005-12-27 16:35:02 UTC
Permalink
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix
Please be specific. Citrix, actually, has problems with *many* apps.
But our Delphi apps seem to work well enough, for the most part. What
problem are you trying to solve?
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
http://blogs.teamb.com/craigstuntz/articles/403.aspx
Levend Sener
2005-12-27 22:06:08 UTC
Permalink
Post by Craig Stuntz [TeamB]
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix
Please be specific. Citrix, actually, has problems with *many* apps.
But our Delphi apps seem to work well enough, for the most part. What
problem are you trying to solve?
Craig, please read my message completely, I think I described it more
detailed ;-)
As it is not _my_ app but of a colleague it's all the details I have ...

Levend.
Craig Stuntz [TeamB]
2006-01-04 12:32:28 UTC
Permalink
Post by Levend Sener
Craig, please read my message completely, I think I described it more
detailed ;-)
No, you didn't. Please give specific details as to what doesn't seem
to work with your app.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio Gonzalez has a new CD of
Irish music out, and it's good: http://tinyurl.com/7hgfr
Brad White
2006-01-04 17:12:59 UTC
Permalink
"Levend Sener" <Levend[REMOVETHIS].Sener[AT]think-factory.de> wrote in
Post by Levend Sener
Post by Craig Stuntz [TeamB]
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix
Please be specific. Citrix, actually, has problems with *many* apps.
But our Delphi apps seem to work well enough, for the most part. What
problem are you trying to solve?
Craig, please read my message completely, I think I described it more
detailed ;-)
As it is not _my_ app but of a colleague it's all the details I have ...
Levend,

Sorry, but I have to agree with Craig. All I see for a description is
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode"
We don't run our app in "Seamless Mode," and we have no problems.
So the question remains, what problem are you trying to solve?
--
Happy New Year,
Brad.
Martin Brekhof
2006-01-04 20:16:24 UTC
Permalink
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix
There are two problems that I'm aware off with Delphi 5 and Citrix (an older
version, Metaframe 1.8 or so):
- Modal popup-screens (printer selection dialog in our case) sometimes do
not get on top, using alt-tab can cure this but this is not available in
seamless mode (it is also happening with VB programs I seem to remember from
the Citrix knowledgebase).
- Running Word (mailmerge) from a seamless application can get you into
trouble if Word decides to popup a question (it doesn't show and so the
application look to be frozen).

Non of these happened when using Citrix as a remote desktop (which I prefer
anyway).

hth,
Martin
Craig Stuntz [TeamB]
2006-01-04 19:44:25 UTC
Permalink
Post by Martin Brekhof
There are two problems that I'm aware off with Delphi 5 and Citrix
This isn't even Citrix-specific. The same things can happen in XP. It
was fixed in D8. I suspect Word had the same issue although I don't
know when or if MS fixed it. It does sound like you're using fairly
archaic software, though.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
http://qc.borland.com -- Vote for important issues
Martin Brekhof
2006-01-05 11:06:43 UTC
Permalink
Post by Craig Stuntz [TeamB]
This isn't even Citrix-specific. The same things can happen in XP.
How do I start an application in seamless mode in XP?

regards,
Martin
Craig Stuntz [TeamB]
2006-01-05 12:19:10 UTC
Permalink
Post by Martin Brekhof
Post by Craig Stuntz [TeamB]
This isn't even Citrix-specific. The same things can happen in XP.
How do I start an application in seamless mode in XP?
Repeat: This isn't Citrix-specific. Stop thinking about this as a
"Citrix issue," because it isn't. An XP feature called window ghosting
can have the same effect. It comes from the fact that older versions of
Delphi don't explicitly inform Windows of the intended Z-order of the
modal dialogs. Hence, under certain circumstances, Windows will get it
wrong.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
Martin Brekhof
2006-01-05 14:01:19 UTC
Permalink
you are talking about: http://qc.borland.com/wc/qcmain.aspx?d=3730 I guess.
From what I understand this is a problem that was introduced in Windows XP
and reported by someone using Delphi 7.

The problem I was talking about occurred in an 'archaic' setup using Delphi
5 and Windows 2000 (with Citrix on top of this). Furthermore: the 'Windows
ghosting' you refer to is something completely different from seamless
applications in Citrix (which is why I do not have the problem when not
running in seamless mode).

It might be that in the end both problems occur because Delphi messes up the
z-oder (or whatever) of the forms but the original question was about
Citrix, Delphi and seamless mode which I contributed my experience to.

regards,
Martin
Post by Craig Stuntz [TeamB]
Post by Martin Brekhof
Post by Craig Stuntz [TeamB]
This isn't even Citrix-specific. The same things can happen in XP.
How do I start an application in seamless mode in XP?
Repeat: This isn't Citrix-specific. Stop thinking about this as a
"Citrix issue," because it isn't. An XP feature called window ghosting
can have the same effect. It comes from the fact that older versions of
Delphi don't explicitly inform Windows of the intended Z-order of the
modal dialogs. Hence, under certain circumstances, Windows will get it
wrong.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
Craig Stuntz [TeamB]
2006-01-05 13:15:49 UTC
Permalink
Were my previous posts too subtle?

The fact that *you* only see the problem when using certain Citrix
settings under archaic versions of both Delphi and Citrix MetaFrame
does not make this a Citrix issue.

Really!

Saying that you see a problem in one circumstance -- which I do belive
-- is not the same as understanding what causes the problem.
Understanding what causes this problem means realizing that it *isn't*
a problem for people who are using current versions of Delphi and that
it isn't a problem with Delphi and Citrix but rather a problem with old
versions of Delphi and Windows under multiple circumstances, including
Terminal Services and window ghosting.

I'm not posting to be snippy about this; the thread started with what
appeared to me to be confusion about what is an is not an issue with
Delphi and Citrix, and I think you are only adding to the confusion
with your posts.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
http://blogs.teamb.com/craigstuntz/articles/403.aspx
Ryan McGinty
2005-12-27 17:18:08 UTC
Permalink
We have not had any issues either. Some components may not be compatible
with Citrix (PDF printers, things that use hardware exclusively, etc). Can
you provide any other info about what issues you are having?

Ryan
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode" (sorry, I am not a a Citrix
expert, hope this is accurate ;-) ). This then causes some serious
performance issues. The underlying infrastructure is a blade server
which slows extremly down (nearly not being responsive anymore) when
40+ users are connected to it using this Delphi/Oracle C/S app,
causing the admins to reboot the server.
TObject
2005-12-27 18:20:52 UTC
Permalink
40+ simultaneous users is actually a very respectful
number for a puny little blade, in my opinion.
Sarah
2005-12-27 21:20:49 UTC
Permalink
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix,
Are you sharing your *Delphi* over Citrix?
How many developers work that way!?
Levend Sener
2005-12-27 22:02:24 UTC
Permalink
Post by Sarah
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix,
Are you sharing your *Delphi* over Citrix?
How many developers work that way!?
No, you misunderstood me. It's meant to be "apps developed with Delphi seem
not to be 100% compatible with Citrix" ;-)

Levend.
Liz
2005-12-27 21:51:09 UTC
Permalink
Post by Levend Sener
No, you misunderstood me. It's meant to be "apps developed with
Delphi seem not to be 100% compatible with Citrix" ;-)
I still reckon its a coding issue rather than an app issue persay..
--
Liz the Brit
Delphi things I have released: http://www.xcalibur.co.uk/DelphiThings
Wayne Niddery [TeamB]
2005-12-27 22:22:02 UTC
Permalink
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode"
More detail is definitely needed here. I don't know of anything about
Delphi-compiled applications that is in any way incompatible with Citrix
(lots of apps compiled in other languages also have problems under Citrix).
I have developed two very major applications that work perfectly fine under
Citrix using different versions of Delphi, and they were not developed with
any knowledge of or consideration for Citrix at all - they just work.

There are certainly things that one might code that will cause problems, but
this has nothing to do with it being done using Delphi.
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"The moment the idea is admitted into society that property is not as
sacred as the laws of God and there is not a force of law and public
justice to protect it, anarchy and tyranny commence." - John Adams
Mike Both
2005-12-28 00:43:38 UTC
Permalink
Where I work I'm responsible for the maintenance and development of a
number of Delphi-based apps, some of which are very complex and have one
hundred or more users - across Citrix. There's never been any problems
with these apps running in such an environment; any issues invariably
have come down to a Citrix or database problem (most of them are front-
ends for Oracle 8/9/10 dbs).

First post - hi! :^)



--- posted by geoForum on http://delphi.newswhat.com
Levend Sener
2005-12-28 00:14:44 UTC
Permalink
Post by Wayne Niddery [TeamB]
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode"
More detail is definitely needed here. I don't know of anything about
Delphi-compiled applications that is in any way incompatible with Citrix
(lots of apps compiled in other languages also have problems under
Citrix). I have developed two very major applications that work perfectly
fine under Citrix using different versions of Delphi, and they were not
developed with any knowledge of or consideration for Citrix at all - they
just work.
There are certainly things that one might code that will cause problems,
but this has nothing to do with it being done using Delphi.
Are there any general/Delphi-specific "Dos and Don'ts" which should be
considered when developing apps that are going to be used in Citrix
environments ?

Levend.
Levend Sener
2005-12-28 00:15:48 UTC
Permalink
"Levend Sener" <Levend[REMOVETHIS].Sener[AT]think-factory.de> schrieb im
Post by Levend Sener
Are there any general/Delphi-specific "Dos and Don'ts" which should be
considered when developing apps that are going to be used in Citrix
environments ?
URLs appreciated ;-)

Levend.
Eivind Bakkestuen
2005-12-28 00:57:00 UTC
Permalink
Post by Levend Sener
URLs appreciated ;-)
msdn.microsoft.com would be the place to go...
--
Eivind Bakkestuen
Nexus Database Systems
Sarah
2005-12-28 20:19:11 UTC
Permalink
Post by Levend Sener
Are there any general/Delphi-specific "Dos and Don'ts" which should be
considered when developing apps that are going to be used in Citrix
environments ?
You have to first make it "Applications under Citrix: Dos and Don'ts" (Remove Delphi-specific from the topic!).

I have been frequently reported an issue with printing from Crystal Reports Preview Window.
When they click the 'Print' button, either nothing happens or they get an error.

As a remedy, I have provided (exposed) the 'Printer Setup' button on the preview window.
This way, user can search/select an appropriate printer before trying to print the report.

This button is exposed by setting the Crystal VCL component's WindowButtonBar.PrintSetupBtn property to true.

Regards,
Sarah
Jon Robertson
2005-12-29 05:15:55 UTC
Permalink
Post by Levend Sener
Are there any general/Delphi-specific "Dos and Don'ts" which should
be considered when developing apps that are going to be used in
Citrix environments ?
Don't store settings in HKLM. Try to avoid storing anything in HKLM.
If you need to store something in the registry, use HKCU. All sessions
/ instances of the app will see a single HKLM.

Similarly, avoid the use of a single file to store configuration or
settings that need to be unique for each user. Use the user's profile
folders for that.

Don't write directly to any hardware, in any way whatsoever. This
includes using third-party drivers that may write directly to hardware.
Call the Win32 API instead.

Any drivers required need to be certified for Citrix. For example, our
software uses a fax printer driver that will not work with Citrix. So
faxing is not available when our customer is using Citrix.

I'm sure there are more. That's all I got tonight. I'm tired. :(
--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
Craig Stuntz [TeamB]
2006-01-04 12:38:06 UTC
Permalink
Jon's post is full of good advice, although none of it is
Delphi-specific. One more: *After* you have implemented Jon's advice,
you can tell Windows that you're a good Terminal Services citizen with
$SetPEOptFlags:

{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}

This significantly reduces the amount of work Windows must do to keep
multiple instances of your app loaded concurrently by removing use of a
compatibility library, but will destabilize your app if you're doing
bad things like sharing a config file.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from http://mers.com
Brad White
2006-01-04 17:16:33 UTC
Permalink
Post by Craig Stuntz [TeamB]
Jon's post is full of good advice, although none of it is
Delphi-specific. One more: *After* you have implemented Jon's advice,
you can tell Windows that you're a good Terminal Services citizen with
{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
Note that IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE
was not defined in D6, but is now, D2005, defined for you in Windows.pas.
--
Happy New Year,
Brad.
Steve Zimmelman
2005-12-28 18:44:37 UTC
Permalink
I have a client using Citrix (100+ users) and several of my applications
built with D5. Nothing serious to report, and nothing in the performance
area.

There are intermittent access violations, but that seems to be it. And the
only time access errors are logged are when the app is used over citrix. We
have about 40 local users, no logged access errors from any of the local
users.

We are using MS SQL Server 2000 and Advantage Database using FoxPro tables
from the legacy days.

"Levend Sener" <Levend[REMOVETHIS].Sener[AT]think-factory.de> wrote in
Post by Levend Sener
Hi all,
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode" (sorry, I am not a a Citrix expert,
hope this is accurate ;-) ). This then causes some serious performance
issues. The underlying infrastructure is a blade server which slows extremly
down (nearly not being responsive anymore) when 40+ users are connected to
it using this Delphi/Oracle C/S app, causing the admins to reboot the
server.
Any idea how to prevent/circumvent this ?
TIA,
Levend.
Lars Black
2005-12-28 23:41:54 UTC
Permalink
A couple of years ago, Danny Thorpe posted some info about making your
Delphi application Terminal Service aware - maybe the same applies to Citrix
as well?

Cheers,
Lars

Quote from Danny:
"Search MSDN for the info on how to make your app Terminal Services
efficient
(here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/building_a_terminal_services_aware_application.asp)

The Delphi compiler has a compiler directive {$SETPEOPTFLAGS nnn} to let you
set the magic bit (IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000)
in the PE exe header that indicates that the exe is safe for use as a
Terminal Services server app. This can reduce the server-side memory
overhead of hosting the app from around 11MB per app instance down to about
100k per app instance.

The main restrictions necessary for efficient execution under Terminal
Services are to avoid writing per-user configuration data to .ini files, and
to avoid using the HKEY_CURRENT_USER section of the registry. For a
Terminal Services-optimized app, there is no current user context on the
server machine."
Abdullah Kauchali
2005-12-29 11:21:57 UTC
Permalink
Post by Lars Black
The main restrictions necessary for efficient execution under Terminal
Services are to avoid writing per-user configuration data to .ini files, and
to avoid using the HKEY_CURRENT_USER section of the registry. For a
Terminal Services-optimized app, there is no current user context on the
server machine."
So, what would be the best way to save user-specific data in Citrix
environments?
Steve Zimmelman
2005-12-29 18:33:50 UTC
Permalink
I use a database that uses the users ID from the application login and the
application ID as a key. I use a blob/memo as an INI to store specific
information for the application. Personally, I hate the Windows registry.

-Steve-
Post by Abdullah Kauchali
Post by Lars Black
The main restrictions necessary for efficient execution under Terminal
Services are to avoid writing per-user configuration data to .ini files, and
to avoid using the HKEY_CURRENT_USER section of the registry. For a
Terminal Services-optimized app, there is no current user context on the
server machine."
So, what would be the best way to save user-specific data in Citrix
environments?
Jon Robertson
2005-12-29 17:59:48 UTC
Permalink
Post by Steve Zimmelman
I use a database that uses the users ID from the application login
and the application ID as a key. I use a blob/memo as an INI to
store specific information for the application. Personally, I hate
the Windows registry.
We also store user specific config in a database table. We have a
TProfile object derived from TPersistent with each user option as a
published property. Then we just stream the object to/from DFM. We
don't have to code the loading/saving of each user option. And as new
user options are added, they're automatically supported. Now if only
our Preferences dialog box was so dynamic...

Actually, I'm in the process of switching TProfile to stream to/from
XML. This way, other code, such as TSQL Stored Procedures can read the
user's profile directly.

However, if you're app does not already use a database, I recommend
storing user settings in HKCU. I'm not sure what Danny's comment about
HKCU really means. Each user that runs an app in Terminal Services /
Citrix gets a Windows profile. User's cannot see each other's profile.

The only issue I could see is if multiple users logged into TS/Citrix
using the same *Windows* login. Then they'd have the same HKCU
profile/hive and that would be messy. But that is a very poor
configuration for so many reasons. And many apps would have fits in
that scenario. Even if you used the user's Document & Settings folder
to avoid the registry, this would cause problems.
--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
Sarah
2005-12-29 19:24:09 UTC
Permalink
Post by Abdullah Kauchali
Post by Lars Black
The main restrictions necessary for efficient execution under Terminal
Services are to avoid writing per-user configuration data to .ini files, and
to avoid using the HKEY_CURRENT_USER section of the registry. For a
Terminal Services-optimized app, there is no current user context on the
server machine."
So, what would be the best way to save user-specific data in Citrix
environments?
This is what I read from the previously provided url:

Store user preference files or other user-specific files in the user's home directory or in a user-specified directory.
This consideration applies to temporary files used to store interim information (such as cached data) or to pass data on to another application.
User-specific temporary files must also be stored on a per-user basis.

You can use the SHGetSpecialFolderLocation function with the CSIDL_PERSONAL flag
to get the location of the user's personal files directory.
You can also use the GetWindowsDirectory function to retrieve the path of the Windows directory.
In a Terminal Services environment, the Windows directory is guaranteed to be private for each user.
Do not store user-specific files under the system directory (for example, WINNT) or program directory (for example, Program Files).
Jon Robertson
2005-12-29 19:40:15 UTC
Permalink
Post by Sarah
In a Terminal Services environment, the Windows directory is
guaranteed to be private for each user.
Further reading reveals:

"Terminal Services: If the application is running in a Terminal
Services environment, each user has a private Windows directory. There
is also a shared Windows directory for the system. If the application
is Terminal-Services-aware (has the
IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE flag set in the image
header), this function returns the path of the system Windows
directory, just as the GetSystemWindowsDirectory function does.
Otherwise, it retrieves the path of the private Windows directory for
the user"

IOW, a true TS aware application should not use GetWindowsDirectory.
IMNSHO, the text you quoted is wrong, because TS aware applications
calling GetWindowsDirectory will return the shared Windows directory,
NOT a private Windows directory.

Stick with SHGetSpecialFolderLocation and CSIDL_PERSONAL.
--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
Sarah
2005-12-29 19:48:52 UTC
Permalink
Post by Lars Black
The Delphi compiler has a compiler directive {$SETPEOPTFLAGS nnn} to let you
set the magic bit (IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000)
What should be the value of nnn in the {$SETPEOPTFLAGS nnn}

Do we get the same effect by directly editing a executable with a PE editor?
I mean by setting the below in the EXE header:
(IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000)

Thanks,
Sarah
Brad White
2005-12-29 21:15:00 UTC
Permalink
Post by Sarah
Post by Lars Black
The Delphi compiler has a compiler directive {$SETPEOPTFLAGS nnn} to let you
set the magic bit (IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000)
What should be the value of nnn in the {$SETPEOPTFLAGS nnn}
{$define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000}
{$SETPEOPTFLAGS IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
--
Happy New Year,
Brad.
Sarah
2005-12-29 23:54:42 UTC
Permalink
Post by Brad White
{$define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000}
{$SETPEOPTFLAGS IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
Thanks. Looks like the below line will do just fine.
{$SetPEOptFlags $8000}
Unless I need some clarity in the code! ;)

Btw, What if I have my app still using HKEY_CURRENT_USER to save user settings.
Is it going to blow away when used on Citrix?

Thanks,
Sarah
Brad White
2005-12-30 00:21:13 UTC
Permalink
Post by Sarah
Post by Brad White
{$define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000}
{$SETPEOPTFLAGS IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
Thanks. Looks like the below line will do just fine.
{$SetPEOptFlags $8000}
Unless I need some clarity in the code! ;)
Sarah,

They are of course, semantically equivalent.

And so long as no one ever has to read your code and understand what
it is doing, and so long as no one will ever remove that line to see what
effect it has and think they found that it has none, and so long as no
one will ever be doing maintenance on your code and ask you why
you put that there, and so long as you never need to set any other
PE Opt flag and wonder what 8000 is and whether they are compatible
and how to merge them, then I'm thinking you are in good shape
and that line should do just fine.
Post by Sarah
Btw, What if I have my app still using HKEY_CURRENT_USER to save user settings.
Is it going to blow away when used on Citrix?
From what I can see, there have been conflicting responses
in this thread on that issue. So, personally, I would not
trust any of them and test it myself.
--
Happy New Year,
Brad.
Sarah
2006-01-03 16:27:08 UTC
Permalink
Post by Brad White
Sarah,
They are of course, semantically equivalent.
And so long as no one ever has to read your code and understand what
it is doing, and ...
Okay, I have added the below lines to define it in the .dpr file in D7
{$DEFINE IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000}
{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}

And I get this error on the second line:
Undeclared identifier: 'IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE'

Anything wrong in the way it was defined?

Thanks,
Sarah
Brad White
2006-01-03 17:00:24 UTC
Permalink
Post by Sarah
Undeclared identifier: 'IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE'
Hmm. Curious. Seems to me like it should work.

2005 has this defined for us now in Windows.pas as
const IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;

I don't see why the DEFINE doesn't work, but const does.
--
Happy New Year,
Brad.
Jon Robertson
2005-12-29 05:09:31 UTC
Permalink
Post by Levend Sener
As Delphi seems not to be 100% compatible with Citrix, this makes it
necessary to set the "Seamless Mode"
Our D6 app works quite well in Citrix, in both Seamless and "non
seamless".
Post by Levend Sener
This then causes some serious
performance issues. The underlying infrastructure is a blade server
which slows extremly down (nearly not being responsive anymore) when
40+ users are connected to it using this Delphi/Oracle C/S app,
Our app is C/S, using DataSnap and MS SQL Server (SQL runs on a
dedicated server). Our customers use server much less elegant than a
blade (our typical Citrix server is a P3 Zeon 733Mhz-ish).

We have seen performance improvements by using FastMM (with D6). Our
client application uses few threads, but FastMM seems to make a huge
difference under Citrix. I suspect the Citrix improvement is because
FastMM uses less memory than the D6 MM. So, each instance of our app
requires less memory, making a major difference when there are 30+
instances running.
Post by Levend Sener
causing the admins to reboot the server.
Any idea how to prevent/circumvent this ?
Lock the room with the servers and hide the key from the admins so they
can't reboot the server. If that doesn't work, disable the admins
remote access to the servers as well.
--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com
Loading...