BOOL WINAPI EnumPlayersCallback2(DPID dpId,
DWORD dwPlayerType, LPCDPNAME lpName,
DWORD dwFlags, LPVOID lpContext);
Application-defined callback function for the IDirectPlay2::EnumGroups, IDirectPlay2::EnumGroupPlayers, and IDirectPlay2::EnumPlayers methods.
·Returns TRUE to continue the enumeration or FALSE to stop it.
dpId
ID of the player or group being enumerated.
dwPlayerType
Type of player, either DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER.
lpName
Address of a constant DPNAME structure containing the name of the player or group.
dwFlags
Specifies the flags that were passed in the IDirectPlay2::EnumGroups, IDirectPlay2::EnumGroupPlayers, or IDirectPlay2::EnumPlayers method.
lpContext
Address of an application-defined context.
Any pointers returned in a callback function are temporary and are valid only in the body of the callback function. If the application needs to save pointer information, it must allocate memory to hold the data, copy the data, and then store the pointer to this new data. In this function, lpName is temporary. Also note that the pointers inside the structure specified in the lpName parameter—lpszShortName / lpszShortNameA and lpszLongName / lpszLongNameA—are also temporary.