CRT 8.0'localtime',Solution-Soft Timemachine,Vista和Citrix [英] CRT 8.0 'localtime', Solution-Soft Timemachine, Vista and Citrix

查看:71
本文介绍了CRT 8.0'localtime',Solution-Soft Timemachine,Vista和Citrix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS 2005下开发了一个Win32 API 'C'dll,它使用C运行时库'localtime'函数将当前设置的显示时间返回给用户。

I have a Win32 API 'C' dll developed under VS 2005 that is using the C Runtime Library 'localtime' function to return the currently set time for display to the user.

如果在Windows Server 2008 R2下的Citrix Xenapp 6.5上运行(即在WoW64进程中),则此功能无法通过解决方案 - 软时间机器识别对时间所做的更改(用于测试目的) ,尽管(例如)命令提示
和Excel进程在显示时间机器改变的时间的相同上下文中运行。

When this is run on Citrix Xenapp 6.5 under Windows Server 2008 R2 (i.e. in a WoW64 process) this function fails to recognise the changes made to the time (for testing purposes) via Solution-Soft Time Machine, despite (for example) command prompts and Excel processes run in the identical context displaying the time as altered by Time Machine.

我已经尝试了各种其他方法来检索库中的时间,例如localtime_s,localtime32,localtime64,  GetLocalTime,GetSystemTime,GetTimeFormat,但它们都同意本地时间结果 - 即未改变的
时间。

I have tried various other means of retrieving the time in the library such as localtime_s, localtime32, localtime64, GetLocalTime, GetSystemTime, GetTimeFormat, but they all agree with the localtime result - i.e. the unaltered time.

有没有人遇到任何类似的问题任何/所有这些上下文中的本地时间函数,或者建议以任何其他方式将"更改"时间传递给此dll?

Has anyone encountered any similar problems with the localtime function in any/all of these contexts, or suggest any other way of getting the 'altered' time through to this dll?

推荐答案

嗯,我会说它不是本地时间的问题,因为它需要一个现有的time_t值并转换它。这可能是调用time()或者你用来构建time_t值的任何东西,这就是问题所在。

Well, I would say it can't be localtime that is the problem since it takes an existing time_t value and converts that. It would be the call to time() or whatever you use to build the time_t value which is the problem here.

无论如何,把它放在一边,这里最有可能的问题是这个应用程序正在挂钩基本的Windows时间函数来修改它们返回的时间,但这并未成功挂钩WoW64版本。函数time()调用get
当前时间是GetSystemTimeAsFileTime,如果你自己调用它而你没有看到任何变化,那么我会说这是Time Machine应用程序的问题所以你应该联系他们的支持。

Anyway, putting that aside, the most likely issue here is that this application is hooking into the basic Windows time functions to modify the time that they return, but this isn't successfully hooking the WoW64 version. The function time() calls to get the current time is GetSystemTimeAsFileTime, if you call this yourself and you don't see any changes, then I would say that it is a problem with the Time Machine application so you should contact their support.


这篇关于CRT 8.0'localtime',Solution-Soft Timemachine,Vista和Citrix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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