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


1 // Helper function - Creates/Joins a session
2 static HRESULT OpenSession()
3 {
4 HRESULT hr;
5 DPSESSIONDESC sessionDesc;
6 ZeroMemory(&sessionDesc, sizeof(DPSESSIONDESC));
7 if(joinSession) //To join a session
8 sessionDesc.dwFlags = DPOPEN_OPENSESSION;
9 else
10 {
11 // To host a new session.
12 sessionDesc.dwFlags = DPOPEN_CREATESESSION;
13 strcpy(sessionDesc.szSessionName, sessionName);
14 sessionDesc.dwMaxPlayers = 10;
15 }
16 sessionDesc.dwSize = sizeof(DPSESSIONDESC);
17 sessionDesc.guidSession = sessionGUID;
18 sessionDesc.dwSession = 2;
19 hr = lpDirectPlay1->Open(&sessionDesc);
20 if(FAILED(hr))
21 ::MessageBox(NULL,"Open Failed", "HelloWorld", MB_OK);
22 return(hr);
23 }
24 OpenSession():
25 Creates or joins a session

in Table To:


© 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