PeerCollabStartup function (p2p.h)

The PeerCollabStartup function initializes the Peer Collaboration infrastructure.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabStartup(
  [in] WORD wVersionRequested
);

Parameters

[in] wVersionRequested

Contains the minimum version of the Peer Collaboration infrastructure requested by the peer.

Return value

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

Return code Description
E_OUTOFMEMORY
There is not enough memory to support this operation.
PEER_E_UNSUPPORTED_VERSION
The requested version of the Peer Collaboration Infrastructure is not supported.

Remarks

This function must be called before any other peer collaboration (PeerCollab*) functions are called.

When the application no longer requires the Peer Collaboration infrastructure, it must make a corresponding call to PeerCollabShutdown. If PeerCollabStartup is called multiple times, there must be a separate corresponding call to PeerCollabShutdown. All of the components of the infrastructure are cleaned up only when the last call to PeerCollabShutdown occurs.

The current supported version is 1.0. Call MAKEWORD(1, 0) to generate this version number WORD value.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also

Peer Collaboration API Functions

PeerCollabShutdown