PeerGraphDelete function (p2p.h)

The PeerGraphDelete function deletes the data associated with a specified peer graph.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphDelete(
  [in] PCWSTR pwzGraphId,
  [in] PCWSTR pwzPeerId,
  [in] PCWSTR pwzDatabaseName
);

Parameters

[in] pwzGraphId

The name of a peer graph to delete data for. Specify the same ID used in calls to PeerGraphCreate or PeerGraphOpen.

[in] pwzPeerId

The peer ID to delete data for. Specify the same ID used in calls to PeerGraphCreate or PeerGraphOpen.

[in] pwzDatabaseName

The name of a database associated with a peer graph. Specify the same ID used in calls to PeerGraphCreate or PeerGraphOpen.

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
Access to a graph is denied.
E_INVALIDARG
One of the parameters is not valid.
PEER_E_NOT_INITIALIZED
A graph must be initialized with a call to PeerGraphStartup before using this function.

Remarks

A peer graph must be closed by using PeerGraphClose before it can be deleted.

If a delete operation fails, a Windows file error code is returned.

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

PeerGraphClose

PeerGraphCreate

PeerGraphOpen

PeerGraphStartup