网站首页  词典首页

请输入您要查询的函数:

 

术语 timeprovcommand
释义 TimeProvCommand
语法:
C++
HRESULT __stdcall TimeProvCommand(
__in TimeProvHandle hTimeProv,
__in TimeProvCmd eCmd,
__in PVOID pvArgs
);
TimeProvCommand回调函数
一个回调函数,是由当时的经理要求提供发送命令的时间提供。
参数
hTimeProv [in]
阿处理供应商的时间。该TimeProvOpen函数收到此处理。
欧共体机器 [in]
该命令被发送。此参数可以是下列值之一。
CommandMeaning
TPC_GetSamplesThe时间提供应返回的时间,已收集样本。如果没有可用数据,提供者应返回任何样品。有关详细信息,请参见备注。
该pvArgs参数是指针TpcGetSamplesArgs结构。时间提供管理器提供样本的缓冲区。如果pvArgs如果缓冲区太小,提供者应提供尽可能多的样本,是可以和返回ERROR_INSUFFICIENT_BUFFER。任何其他错误,在提供程序返回代码将被忽略。
TPC_NetTopoChangeThe网络拓扑结构发生了变化。网络供应商必须重新检测网络设置,并验证它们可以达到的来源。
在pvArgs参数指示是否更改是由用户(NTC_UserRequested)或系统(NTC_Default)要求。
TPC_QueryReserved供将来使用。
TPC_PollIntervalChangedThe轮询间隔已更改。时间提供者应立即GetTimeSysInfo函数来检索新值。
该pvArgs参数不使用。由提供者返回的任何错误将被忽略。
TPC_ShutdownThe系统正在关闭。时间提供者应退出在五秒钟内。
该pvArgs参数不使用。
TPC_TimeJumpedThe系统时钟突然调整了,所以时间提供应该摒弃任何时候挽救了邮票。
在pvArgs参数指示是否跳的时间是由用户(TJF_UserRequested)或系统(TJF_Default)要求。
TPC_UpdateConfigThe时间供应商应核实其是否应用程序特定的配置数据存储在注册表中发生了变化。
该pvArgs参数不使用。由提供者返回的任何错误将被忽略。
pvArgs [in]
一个缓冲区,指定命令信息的指针。这一数据格式取决于欧共体机器的价值。
返回值
如果函数成功,返回值为S_OK。否则,返回值是在Winerror.h中定义的错误代码之一。
备注
时间提供绝不能超过半秒回这个电话。
当处理TPC_GetSamples命令,供应商应该返回为每个源监测是一个样本。因此,硬件供应商应返回一个样本,而像NTP的网络供应商可以返回多个样本。提供者不应该返回单一来源的多个样本,它应该返回其样本缓存的源最好的样本。提供者可以返回的后续调用相同的样本,提供的数据并没有改变。
实例
有关示例,请参见采样时间提供程序。
要求:
最低支持client-Windows XP
最低支持serverWindows服务器2003
HeaderTimeprov.h
参见
GetTimeSysInfoFunc
TpcGetSamplesArgs
TimeProvOpen
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==TimeProvCommand Callback Function
A callback function that is called by the time provider manager to send commands to the time provider.
Syntax
C++
HRESULT __stdcall TimeProvCommand(
__in TimeProvHandle hTimeProv,
__in TimeProvCmd eCmd,
__in PVOID pvArgs
);
Parameters
hTimeProv [in]
A handle to the time provider. The TimeProvOpen function receives this handle.
eCmd [in]
The command to be sent. This parameter can be one of the following values.
CommandMeaning
TPC_GetSamplesThe time provider should return the time samples it has collected. If there is no data available, the provider should return no samples. For more details, see Remarks.
The pvArgs parameter is pointer to a TpcGetSamplesArgs structure. The time provider manager provides the buffer for the samples. If the pvArgs buffer if too small, the provider should provide as many samples as is can and return ERROR_INSUFFICIENT_BUFFER. Any other error codes returned by the provider are ignored.
TPC_NetTopoChangeThe network topology has changed. Network providers must redetect the network settings and verify that they can reach their sources.
The pvArgs parameter indicates whether the change was requested by the user (NTC_UserRequested) or the system (NTC_Default).
TPC_QueryReserved for future use.
TPC_PollIntervalChangedThe polling interval has changed. The time provider should call the GetTimeSysInfo function to retrieve the new value.
The pvArgs parameter is not used. Any error returned by the provider is ignored.
TPC_ShutdownThe system is shutting down. The time provider should exit within five seconds.
The pvArgs parameter is not used.
TPC_TimeJumpedThe system clock was adjusted abruptly, so the time provider should discard any time stamps it has saved.
The pvArgs parameter indicates whether the time jump was requested by the user (TJF_UserRequested) or the system (TJF_Default).
TPC_UpdateConfigThe time provider should verify whether its application-specific configuration data stored in the registry has changed.
The pvArgs parameter is not used. Any error returned by the provider is ignored.

pvArgs [in]
A pointer to a buffer that specifies command information. The format of this data depends on the value of eCmd.
Return Value
If the function succeeds, the return value is S_OK. Otherwise, the return value is one of the error codes defined in WinError.h.
Remarks
The time provider should never take longer than half a second to return from this call.
When processing the TPC_GetSamples command, the provider should return one sample for each source it is monitoring. Therefore, a hardware provider should return one sample, while a network provider like NTP can return multiple samples. The provider should not return multiple samples from a single source; it should return the best sample from its cache of samples for the source. The provider can return the same sample on subsequent calls, provided that the data has not changed.
Examples
For an example, see Sample Time Provider .
Requirements
Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderTimeprov.h
See Also
GetTimeSysInfoFunc
TpcGetSamplesArgs
TimeProvOpen
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms725465(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:19:04