PFNPEER_VALIDATE_RECORD callback function (p2p.h)

The PFNPEER_VALIDATE_RECORD callback specifies the function that the Peer Graphing Infrastructure calls to validate records.

Syntax

PFNPEER_VALIDATE_RECORD PfnpeerValidateRecord;

HRESULT PfnpeerValidateRecord(
  [in] HGRAPH hGraph,
  [in] PVOID pvContext,
  [in] PPEER_RECORD pRecord,
  [in] PEER_RECORD_CHANGE_TYPE changeType
)
{...}

Parameters

[in] hGraph

Specifies the peer graph associated with the specified record.

[in] pvContext

Pointer to the security context. This parameter should point to the pvContext member of the PEER_SECURITY_INTERFACE structure.

[in] pRecord

Specifies the record to validate.

[in] changeType

Specifies the reason the validation must occur. Must be one of the PEER_RECORD_CHANGE_TYPE values.

Return value

If this callback succeeds, the return value is S_OK; otherwise, the function returns one of the following errors:

Return code Description
E_INVALIDARG
One of the parameters is not valid.
PEER_E_DEFERRED_VALIDATION
The specified record cannot be validated at this time because there is insufficient information to complete the operation. Validation is deferred. Call PeerGraphValidateDeferredRecords when sufficient information is obtained.
PEER_E_INVALID_RECORD
The specified record is invalid.

Remarks

When this callback is called by the Peer Graphing Infrastructure, a PEER_RECORD_CHANGE_TYPE value is passed. This specifies the operation just performed on the record. The application must verify the record based on the change type. If the application requires more information to verify the record, it can return PEER_E_DEFERRED_VALIDATION and the Peer Graphing Infrastructure places the record in a deferred-record list. Once the security mechanism has enough information to validate the record, it calls PeerGraphValidateDeferredRecords, and any record in the deferred-record list is re-submitted for validation.

This callback can be invoked from any of the Peer Graphing API functions involving records, such as PeerGraphUpdateRecord.

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

See also

PEER_RECORD

PEER_RECORD_CHANGE_TYPE

PEER_SECURITY_INTERFACE

PeerGraphValidateDeferredRecords