PeerGraphPeerTimeToUniversalTime function (p2p.h)
The PeerGraphPeerTimeToUniversalTime function converts the peer graph-maintained reference time value to a localized time value appropriate for display on the peer's computer.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphPeerTimeToUniversalTime(
[in] HGRAPH hGraph,
[in] FILETIME *pftPeerTime,
[out] FILETIME *pftUniversalTime
);
Parameters
[in] hGraph
Handle to the peer graph this peer participates in. This handle is returned by the PeerGraphCreate, or PeerGraphOpen function.
[in] pftPeerTime
Pointer to the peer time (UTC) value, represented as a FILETIME structure.
[out] pftUniversalTime
Pointer to the returned universal time value, represented as a FILETIME structure.
Return value
Returns S_OK if the function succeeds; otherwise, the function returns one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
The handle to the graph is invalid. |
|
The graph must be initialized with a call to PeerGraphStartup before using this function. |
Remarks
Universal time is the UTC time derived from the peer's system clock.
Peer time is a common reference time maintained by the peer graph, expressed as Greenwich Mean Time.
Peer time should be converted to universal time whenever it is necessary to display this value on the peer's computer, such as when displaying the creation time of a record. Likewise, time-sensitive actions, such as setting the expiration time for a record or searching for records based on modification time, should use time values converted from the computer-specific universal time to graph-specific peer time.
Universal time can be converted to peer time by calling the converse function PeerGraphUniversalTimeToPeerTime.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP |
Minimum supported server | None supported |
Target Platform | Windows |
Header | p2p.h |
Library | P2PGraph.lib |
DLL | P2PGraph.dll |