Basic HTML version of Foils prepared July 5 98

Foil 162 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. by Wojtek Furmanski, Subhash Nair, Tom Pulikal


// Helper function - Creates/Joins a session
static HRESULT OpenSession()
{
HRESULT hr;
DPSESSIONDESC sessionDesc;
ZeroMemory(&sessionDesc, sizeof(DPSESSIONDESC));
if(joinSession) //To join a session
sessionDesc.dwFlags = DPOPEN_OPENSESSION;
else
{
// To host a new session.
sessionDesc.dwFlags = DPOPEN_CREATESESSION;
strcpy(sessionDesc.szSessionName, sessionName);
sessionDesc.dwMaxPlayers = 10;
}
sessionDesc.dwSize = sizeof(DPSESSIONDESC);
sessionDesc.guidSession = sessionGUID;
sessionDesc.dwSession = 2;
hr = lpDirectPlay1->Open(&sessionDesc);
if(FAILED(hr))
::MessageBox(NULL,"Open Failed", "HelloWorld", MB_OK);
return(hr);
}
OpenSession():
Creates or joins a session



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998