PeerGroupUpdateRecord function (p2p.h)

The PeerGroupUpdateRecord function updates a record within a specific peer group.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupUpdateRecord(
  [in] HGROUP       hGroup,
  [in] PPEER_RECORD pRecord
);

Parameters

[in] hGroup

Handle to the peer group whose record is updated. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

[in] pRecord

Pointer to a PEER_RECORD structure that contains the updated record for hGroup. This parameter is required.

The following members in PEER_RECORD can be updated.

  • pwzAttributes
  • ftExpiration
  • data
The following members in PEER_RECORD must be present, but cannot be changed.
  • dwSize
  • id
  • type
  • dwFlags
The following members are ignored if populated.
  • dwVersion
  • pwzCreatorId
  • pwzModifiedById
  • ftCreation
  • ftLastModified
  • securityData
The members that remain are optional.

Return value

Returns S_OK if the operation succeeds. Otherwise, the function returns one of the following values.

Return code Description
E_INVALIDARG
One of the specified parameters is invalid.
PEER_E_GROUP_NOT_READY
The peer group is not in a state where a record can be updated, for example, PeerGroupJoin has been called, but synchronization with the peer group database is not complete.
PEER_E_INVALID_GROUP
The handle to the peer group is invalid.
PEER_E_NOT_AUTHORIZED
The current peer identity does not have the authorization to delete the record. In this case, the peer identity is not the creator of the record.
PEER_E_RECORD_NOT_FOUND
The record cannot be located in the data store.
 

Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.

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 P2P.lib
DLL P2P.dll

See also

PEER_RECORD

PeerGroupAddRecord

PeerGroupCreate

PeerGroupDeleteRecord

PeerGroupJoin

PeerGroupOpen