PeerDistStartup function (peerdist.h)

The PeerDistStartup function creates a new Peer Distribution instance handle which must be passed to all other Peer Distribution APIs.

Syntax

DWORD PeerDistStartup(
  [in]            DWORD                     dwVersionRequested,
  [out]           PPEERDIST_INSTANCE_HANDLE phPeerDist,
  [out, optional] PDWORD                    pdwSupportedVersion
);

Parameters

[in] dwVersionRequested

Contains the minimum version of the Peer Distribution requested by the application. The high order byte specifies the minor version number; the low order byte specifies the major version number.

[out] phPeerDist

A pointer to a PEERDIST_INSTANCE_HANDLE variable which upon success receives a newly created handle.

[out, optional] pdwSupportedVersion

A pointer to a variable which, if not NULL, contains the maximum version number that is supported by the Peer Distribution system. The high order byte specifies the minor version number; the low order byte specifies the major version number.

Return value

If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function may return one of the following values:

Return code Description
ERROR_INVALID_PARAMETER
One or more parameters are invalid.
PEERDIST_ERROR_VERSION_UNSUPPORTED
The requested version is not supported by client side DLL.

Remarks

PeerDistStartup must be called before any other Peer Distribution functions. When no longer needed, the handle returned by PeerDistStartup should be closed via a call to PeerDistShutdown.

Requirements

Requirement Value
Minimum supported client Windows 7 Professional [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header peerdist.h
Library PeerDist.lib
DLL PeerDist.dll

See also

PeerDistShutdown