检测citrix“应用模式”? [英] Detect citrix "application mode"?

查看:185
本文介绍了检测citrix“应用模式”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们的应用程序在启动时出现问题,因为它不显示任务栏图标,直到主窗口向上,即使在此之前屏幕上正在加载进度窗口,登录窗口等。



我们更改代码以解决此问题,但是不幸的是,当通过citrix运行应用程序时,这个修复现在显示了两个图标,一个只是图标,没有文字。



有没有办法来检测应用程序正在通过citrix运行?我不知道这个的正确的术语,但只有应用程序窗口被带到用户桌面,而不是整个远程桌面。



如果重要,应用程序是用德尔福写的。

解决方案

不知道在delphi中如何做到这一点,但是如果你可以调用user32。 dll,并调用函数:

  if(GetSystemMetrics(SM_REMOTESESSION)!= 0)
{
//我们在远程会话
}

这应该告诉你,如果你正在运行在Citrix或终端服务环境中。
SM_REMOTESESSION被定义为:

  #define SM_REMOTESESSION 0x1000 
pre>

有关GetSystemMetrics api的更多信息,请访问:
链接到msdn



修改
以下页面介绍如何完全在delphi中。适用于终端服务的功能也适用于Citrix:



您的Delphi应用程序作为远程会话在终端服务下运行


Forgive me for probably using the wrong term for this "application mode".

Our application has a problem during start in that it doesn't show a task bar icon until the main window is up, even though there are loading progress windows, logon-windows, etc. on screen before that.

We change the code to fix this, but unfortunately this fix, when running the app through citrix, now shows two icons, one with just the icon and no text.

Is there a way for me to detect that the application is running through citrix? I don't know the right term for this, but only the app window is brought to the users desktop, not the whole remote desktop.

If it matters, the app is written in Delphi.

解决方案

Not sure exactly how to do this in delphi, but if you can call out to the user32.dll, and call the function:

if (GetSystemMetrics(SM_REMOTESESSION) != 0)
{
   // We are in a remote session
}

This should tell you if you are running in a Citrix or Terminal Services environment. SM_REMOTESESSION is defined as:

#define SM_REMOTESESSION        0x1000

More info on the GetSystemMetrics api here: Link to msdn

Edit The following page describes how to do exactly the above in delphi. What works for Terminal Services should also work for Citrix:

Is your Delphi Application Running under Terminal Services as a Remote Session

这篇关于检测citrix“应用模式”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆