This topic has not yet been rated - Rate this topic

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 codeDescription
E_INVALIDARG

One of the parameters is not valid.

PEER_E_GROUP_IN_USE

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.

PEER_E_INVALID_GROUP

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

P2P.h

Library

P2P.lib

DLL

P2P.dll

See also

PeerGroupConnect
PeerGroupCreate
PerrGroupExportDatabase
PeerGroupJoin
PeerGroupOpen

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.