PEER_RECORD structure (p2p.h)

The PEER_RECORD structure contains the record object that an application uses.

Syntax

typedef struct peer_record_tag {
  DWORD     dwSize;
  GUID      type;
  GUID      id;
  DWORD     dwVersion;
  DWORD     dwFlags;
  PWSTR     pwzCreatorId;
  PWSTR     pwzModifiedById;
  PWSTR     pwzAttributes;
  FILETIME  ftCreation;
  FILETIME  ftExpiration;
  FILETIME  ftLastModified;
  PEER_DATA securityData;
  PEER_DATA data;
} PEER_RECORD, *PPEER_RECORD;

Members

dwSize

Specifies the size of a structure. Set the value to sizeof(PEER_RECORD).

type

Specifies the type of record. The type is a GUID that an application must specify. The GUID represents a unique record type, for example, a chat record.

id

Specifies the unique ID of a record. The Peer Infrastructure supplies this ID. This parameter is ignored in calls to PeerGroupAddRecord. An application cannot modify this member.

dwVersion

Specifies the version of a record that the Peer Infrastructure supplies when an application calls PeerGraphAddRecord or PeerGraphUpdateRecord. An application cannot modify this member.

dwFlags

Specifies the flags that indicate special processing, which must be applied to a record. The following table identifies the valid values.

Value Description
PEER_RECORD_FLAG_AUTOREFRESH Indicates that a record is automatically refreshed when it is ready to expire.
PEER_RECORD_FLAG_DELETED Indicates that a record is marked as deleted.
 
Note   An application cannot set these flags.
 

pwzCreatorId

Pointer to the unique ID of a record creator. This member is set to NULL for calls to PeerGraphAddRecord and PeerGraphUpdateRecord. An application cannot set this member.

pwzModifiedById

Specifies the unique ID of the last person who changes a record. An application cannot set this member.

pwzAttributes

Pointer to the set of attribute name and value pairs that are associated with a record. This member points to an XML string. Record attributes are specified as an XML string, and they must be consistent with the Peer Infrastructure record attribute schema. For a complete explanation of the XML schema, see Record Attribute Schema.

The Peer Infrastructure reserves several attribute names that a user cannot set. The following list identifies the reserved attribute names:

  • peerlastmodifiedby
  • peercreatorid
  • peerlastmodificationtime
  • peerrecordid
  • peerrecordtype
  • peercreationtime
  • peerlastmodificationtime

ftCreation

Specifies the Coordinated Universal Time (UTC) that a record is created. The Peer Infrastructure supplies this value, and the value is set to zero (0) in calls to PeerGroupAddRecord. An application cannot set this member.

ftExpiration

The UTC time that a record expires. This member is required. It can be updated to a time value greater than the originally specified time value, but it cannot be less than the originally specified value.

Note   If dwFlags is set to PEER_RECORD_FLAG_AUTOREFRESH, do not set the value of ftExpiration to less than four (4) minutes. If this member is set to less than four (4) minutes, undefined behavior can occur.
 

ftLastModified

The UTC time that a record is modified. The Peer Infrastructure supplies this value. Set this member to NULL when calling PeerGraphAddRecord, PeerGraphUpdateRecord, PeerGroupAddRecord, and PeerGroupUpdateRecord. An application cannot set this member.

securityData

Specifies the security data contained in a PEER_DATA structure. The Graphing API uses this member, and provides the security provider with a place to store security data, for example, a signature. The Grouping API cannot modify this member.

data

Specifies the actual data that this record contains.

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
Header p2p.h

See also

PEER_DATA

PFNPEER_SECURE_RECORD

PFNPEER_VALIDATE_RECORD

PeerGraphAddRecord

PeerGraphDeleteRecord

PeerGraphGetRecord

PeerGraphUpdateRecord

PeerGroupAddRecord

PeerGroupDeleteRecord

PeerGroupGetRecord

PeerGroupUpdateRecord