PeerGraphUniversalTimeToPeerTime function (p2p.h)
The PeerGraphUniversalTimeToPeerTime function converts a universal time value from the peer's computer to a common peer graph time value.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphUniversalTimeToPeerTime(
[in] HGRAPH hGraph,
[in] FILETIME *pftUniversalTime,
[out] FILETIME *pftPeerTime
);
Parameters
[in] hGraph
Handle to the peer graph this peer participates in. This handle is returned by the PeerGraphCreate or PeerGraphOpen function.
[in] pftUniversalTime
Pointer to the universal time value, represented as a FILETIME structure.
[out] pftPeerTime
Pointer to the returned peer time (UTC) value, represented as a FILETIME structure.
Return value
Returns S_OK if the function succeeds; otherwise, the function returns either one of the RPC errors or one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
The handle to the peer 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 peer graph-specific peer time.
Peer time can be converted to universal time by calling the converse function PeerGraphPeerTimeToUniversalTime.
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 |