PeerGroupImportDatabase function (p2p.h)
The PeerGroupImportDatabase function imports a peer group database from a local file.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupImportDatabase(
[in] HGROUP hGroup,
[in] PCWSTR pwzFilePath
);
Parameters
[in] hGroup
Handle to a peer group whose database is imported from a local file. 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 data is stored, for example, "C:\backup\p2pdb.db". If the file does not exist at this location, an appropriate error from the file system is returned. This parameter is required.
Return value
Returns S_OK if the operation succeeds. Otherwise, the function returns one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
The operation cannot be completed because the peer group database is currently in use. For example, PeerGroupConnect has been called by a peer, but has not yet completed any database transactions. |
|
The handle to the peer group is invalid. |
Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.
Remarks
This function must be called before PeerGroupConnect, and after PeerGroupOpen or PeerGroupJoin.
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 |