PeerGroupExportDatabase function (p2p.h)

The PeerGroupExportDatabase function exports a peer group database to a specific file, which can be transported to another computer and imported with the PeerGroupImportDatabase function.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupExportDatabase(
  [in] HGROUP hGroup,
  [in] PCWSTR pwzFilePath
);

Parameters

[in] hGroup

Handle to the peer group whose database is exported to a local file on the peer. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

[in] pwzFilePath

Pointer to a Unicode string that contains the absolute file system path and file name where the exported database is stored. For example, "C:\backup\p2pdb.db". If this file already exists at the specified location, the older file is overwritten. This parameter is required.

Return value

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

Note  If an export fails due to a file system error, the appropriate file system error, defined in winerror.h, is returned.
 
Return code Description
E_INVALIDARG
One of the parameters is not valid.
E_OUTOFMEMORY
There is not enough memory to perform the specified operation.
 

Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.

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

See also

PeerGroupImportDatabase