PeerGroupStartup function (p2p.h)
The PeerGroupStartup function initiates a peer group by using a requested version of the Peer infrastructure.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupStartup(
[in] WORD wVersionRequested,
[out] PPEER_VERSION_DATA pVersionData
);
Parameters
[in] wVersionRequested
Specifies the highest version of the Peer Infrastructure that a caller can support. The high order byte specifies the minor version (revision) number. The low order byte specifies the major version number This parameter is required.
[out] pVersionData
Pointer to a PEER_VERSION_DATA structure that contains the specific level of support provided by the Peer Infrastructure. This parameter is required.
Return value
Returns S_OK if the function succeeds. Otherwise, the function returns one of the following values.
Return code | Description |
---|---|
|
The Peer Name Resolution Protocol (PNRP) service must be started before calling PeerGroupStartup. |
|
There is not enough memory available to complete the operation. |
|
The grouping service failed to start because IPv6 is not installed on the computer. |
|
The requested version is not supported by the installed Peer subsystem. |
Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.
Remarks
The Peer Name Resolution Protocol (PNRP) service must be started before calling this function.
This function is called by the application before calling any other Peer Grouping function.
For this release, applications should use PEER_GROUP_VERSION as the requested version.
A peer group started with this function is closed by calling PeerGroupShutdown when the application terminates.
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 | P2P.lib |
DLL | P2P.dll |