Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 4 - NetSprocket / NetSprocket Reference
NetSprocket Functions / Human Interface Functions


NSpDoModalJoinDialog

You can use the NSpDoModalJoinDialog function to present the user with a default dialog box for finding and joining a game advertised on the network.

NSpAddressReference NSpDoModalJoinDialog (
	ConstStr31Param inGameType,
	ConstStr31Param inEntityListLabel,
	Str31 ioName,
	Str31 ioPassword,
	NSpEventProcPtr inEventProcPtr);
inGameType
A Pascal (maximum 31 characters) string used to register your game's NBP (Name Binding Protocol) type. This must be the same as the one used to host a game.
inEntityListLabel
A Pascal string that will be displayed above the entity list in the AppleTalk panel of the dialog box, as a label for the list of available games.
ioName
A Pascal (maximum 31 characters) string of the user name (generally from a preferences setting). Pass an empty string (not NULL) if you do not want a default name displayed in the dialog box. This field will contain any changes the user made to the name on return.
ioPassword
A Pascal (maximum 31 characters) string of the password (generally from a preferences setting). Pass an empty string (not NULL) if you do not want a default password displayed in the dialog box. This field will contain the any changes the user made to the password on return.
inEventProcPtr
A pointer to DialogProcUPP, the dialog filter function for handling Mac OS events that may affect other windows you have displayed on the screen concurrently. Pass NULL if you do not need to receive Mac OS events while the NetSprocket dialog box is being displayed.
function result
An opaque reference to a protocol address selected by the user.
DESCRIPTION
If the user cancels the dialog box, the function will return NULL. If the user selects OK, it will return a reference to the protocol address of a game host. This reference should then be passed to NSpGame_Join. Once you have called NSpGame_Join, call NSpReleaseAddressReference to release the reference.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help