2.2.1 DPNID

The DPNID identifier describes the 32-bit DirectPlay network identifier for a player in a game session.

This type is declared as follows:

 typedef DWORD DPNID, *PDPNID;

The DPNID for each player in the game session MUST be unique. The DPNID for a player is generated in several steps while adding the player to the game session.

  1. The index of the entry in the name table that was used to create the player is stored in the lowest 20 bits of the DPNID. For example, when the index of the entry within the name table is 5, the index is stored as 0xNNN00005.

  2. Along with the index, the version of the name table that existed when the entry was created is also stored. For example, when the name table version is 10 (0x0A), the index is stored as 0x00A00005.

  3. This value is then XOR'd with the first 32 bits of the game session instance GUID. For example, if the instance GUID begins with 0xA1B2C3D4, the DPNID 0x00A00005 value would be XOR'd with 0xA1B2C3D4 to yield 0xA112C3D1.

Note The DirectPlay host uses the DPNID of a player to determine the location for this DPNID entry in the name table.