Export (0) Print
Expand All

PeerGroupExportConfig function

The PeerGroupExportConfig function exports the group configuration for a peer as an XML string that contains the identity, group name, and the GMC for the identity.

Syntax


HRESULT WINAPI PeerGroupExportConfig(
  _In_   HGROUP hGroup,
  _In_   PCWSTR pwzPassword,
  _Out_  PWSTR *ppwzXML
);

Parameters

hGroup [in]

Handle to the group. This handle is returned by the PeerGroupCreate, PeerGroupOpen, or PeerGroupJoin function. This parameter is required.

pwzPassword [in]

Specifies the password used to protect the exported configuration. There are no rules or limits for the formation of this password. This parameter is required.

ppwzXML [out]

Pointer to the returned XML configuration string that contains the identity, group peer name, cloud peer name, group scope, and the GMC for the identity. This parameter is required.

Return value

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

Return codeDescription
E_INVALIDARG

One of the parameters is not valid.

E_OUTOFMEMORY

There is not enough memory to perform the specified operation.

PEER_E_NO_KEY_ACCESS

Access to the identity or group keys is denied. Typically, this is caused by an incorrect access control list (ACL) for the folder that contains the user or computer keys. This can happen when the ACL is reset manually .

 

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

Remarks

After being exported, this configuration can be passed out-of-band to another peer, where the configuration of the identity can be established. To import the configuration, pass the XML string returned by this function with the password set on it to PeerGroupImportConfig.

The configuration XML string appears in the following format:

<PEERGROUPCONFIG VERSION="1.0">
  <IDENTITYPEERNAME>
    <!-- UTF-8 encoded peer name of the identity -->
  </IDENTITYPEERNAME>
  <GROUPPEERNAME>
    <!-- UTF-8 encoded peer name of the group -->
  </GROUPPEERNAME>
  <CLOUDNAME>
    <!-- UTF-8 encoded Unicode name of the cloud -->
  </CLOUDNAME>
  <SCOPE>
    <!-- UTF-8 encoded Unicode name of the scope: global, site-local, link-local -->
  </SCOPE>
  <CLOUDFLAGS>
    <!-- A DWORD containing cloud-specific settings, represented as a string -->
  </CLOUDFLAGS>
  <GMC xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">
    <!-- base64/PKCS7 encoded GMC chain -->
  </GMC>
</PEERGROUPCONFIG>

Requirements

Minimum supported client

Windows XP with SP2 [desktop apps only]

Minimum supported server

None supported

Version

Windows XP with SP1 with the Advanced Networking Pack forWindows XP

Header

P2P.h

Library

P2P.lib

DLL

P2P.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft