Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The PeerGraphImportDatabase function imports a file that contains the information from a peer graph database. This function can only be called if the application has not yet called the PeerGraphListen or PeerGraphConnect function.
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphImportDatabase(
[in] HGRAPH hGraph,
[in] PCWSTR pwzFilePath
);
[in] hGraph
Handle to the peer graph.
[in] pwzFilePath
Pointer to a string that contains the path to the file in which the imported data is stored.
If the function call succeeds, the return value is S_OK. Otherwise, it returns either one of the WinErr.h values or one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
The graph is currently being used, and cannot be imported. Either PeerGraphListen or PeerGraphConnect has been called. |
|
The specified database is not valid. |
|
The handle to the peer graph is invalid. |
|
The graph must be initialized with a call to PeerGraphStartup before using this function. |
The PeerGraphImportDatabase function cannot be used to import a database from a different peer graph. PeerGraphImportDatabase must be called after PeerGraphOpen, not after PeerGraphCreate.
The database being imported must have the same peer graph ID and peer ID.
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 | P2PGraph.lib |
DLL | P2PGraph.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today