$#K SNetEnumGames

Enumerates all games available on the current network provider which match the program and version IDs.  The callback function you provide is called once for each matching game.

Some network providers can take a significant amount of time to find all active games (for example, one second).  Instead of blocking for this duration, the function returns only the games it currently knows about, and then gives you a hint about when you should call it back to receive a more complete list.

Rather than calling this function manually, an application will generally call SNetSelectGame() to present the user with a list of games and allow him to join a game or create a new one.

BOOL SNetEnumGames (
	DWORD				categorybits,
	DWORD				categorymask,
	SNETENUMGAMESPROC	callback,
	DWORD				*hintnextcall
);

Parameters

categorybits
A set of bits that specify which categories of games the application is interested in enumerating.

categorymask
A mask specifying which categories must match in order for a game to be enumerated.  The following logical statement shows how categorybits and categorymask are used to select games:

if (categorybits AND categorymask)
equals (gamecategorybits AND categorymask)
then enumerate game

callback
The application’s callback function.  See EnumGamesProc() for a description.

hintnextcall
The time that the application should wait before calling this function again, in milliseconds.  If this number is zero, there is no need to call the function again.

Return Value

This function returns TRUE for success or FALSE for failure.  The function can fail if:
•	No network provider has been initialized
•	No callback function is provided
•	The system is out of memory
•	The network provider is unable to retrieve a list of games