PeerGroupImportDatabase function
The PeerGroupImportDatabase function imports a peer group database from a local file.
Syntax
HRESULT WINAPI PeerGroupImportDatabase( _In_ HGROUP hGroup, _In_ PCWSTR pwzFilePath );
Parameters
- hGroup [in]
-
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.
- pwzFilePath [in]
-
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.
Note If an import fails due to a file system error, the appropriate file system error is returned.
| 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
|
Minimum supported client | Windows XP with SP2 [desktop apps only] |
|---|---|
|
Minimum supported server | None supported [desktop apps only] |
|
Version | Windows XP with SP1 with the Advanced Networking Pack forWindows XP |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012
