读书人

关于SetTimeZoneInformation设立时区的

发布时间: 2013-03-25 15:43:04 作者: rapoo

关于SetTimeZoneInformation设置时区的API的使用
MSDN上“An application must have the SE_TIME_ZONE_NAME privilege for this function to succeed. This privilege is disabled by default. Use the AdjustTokenPrivileges function to enable the privilege before calling SetTimeZoneInformation, and then to disable the privilege after the SetTimeZoneInformation call. For more information, see Running with Special Privileges.”

我只调用了SetTimeZoneInformation这个函数,没有调用获取权限的函数,为何还是可以设置成功呢?什么情况下会出现没有权限呢?


[解决办法]
比如你用非Administrators组的用户登录时。

读书人网 >C++

热点推荐