PeerGraphDeleteRecord function (p2p.h)

The PeerGraphDeleteRecord function marks a record as deleted within a peer graph. The record is not available on a local node to function calls, for example, calls to PeerGraphGetRecord and PeerGraphEnumRecords.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphDeleteRecord(
  [in] HGRAPH     hGraph,
  [in] const GUID *pRecordId,
  [in] BOOL       fLocal
);

Parameters

[in] hGraph

Handle to a peer graph.

[in] pRecordId

Pointer to a record ID to delete.

[in] fLocal

Specify TRUE to remove a record from only a local database without notifying the rest of a peer graph about the change. Specify FALSE to delete the record from an entire peer graph.

Note   Specifying TRUE does not prevent a record from being added again during the next graph synchronization with a neighbor. Specifying TRUE is only effective if PEER_SECURITY_INTERFACE is specified in a call to PeerGraphOpen or PeerGraphCreate, and only if PEER_SECURITY_INTERFACE contains a PFNPEER_VALIDATE_RECORD function that returns PEER_E_INVALID_RECORD when validating the record.
 

Return value

If the function call succeeds, the return value is S_OK. Otherwise, it returns one of the following values.

Return code Description
E_ACCESSDENIED
Cannot access a peer graph.
PEER_E_GRAPH_NOT_READY
The peer graph is not synchronized. Records cannot be deleted until the graph is synchronized.
PEER_E_INVALID_GRAPH
The handle to a peer graph is invalid.
PEER_E_NOT_INITIALIZED
The peer graph must be initialized with a call to PeerGraphStartup before using this function.
PEER_E_RECORD_NOT_FOUND
The specified record cannot be found.

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

See also

PeerGraphAddRecord

PeerGraphEnumRecords

PeerGraphGetRecord

PeerGraphUpdateRecord