Basic HTML version of Foils prepared July 5 98

Foil 163 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 a player
2 static HRESULT MakePlayer()
3 {
4 HRESULT hr;
5 // Create a player
6 hr = lpDirectPlay1->CreatePlayer(&playerID, "Billy", "Bill Clinton", NULL);
7 if(FAILED(hr))
8 ::MessageBox(NULL,"CreatePlayer Failed", "HelloWorld", MB_OK);
9 return(hr);
10 }
11 // Clean up before exiting
12 static void CleanUp()
13 {
14 //Done with DirectDraw
15 if( lpFrontBuffer )
16 {
17 lpFrontBuffer->Release();
18 lpFrontBuffer = NULL;
19 }
20 lpdd->RestoreDisplayMode();
21 lpdd->Release();
22 //Done with DirectPlay
23 if (lpDirectPlay1)
24 {
25 lpDirectPlay1->DestroyPlayer(playerID);
26 lpDirectPlay1->Close();
27 lpDirectPlay1->Release();
28 }
29 PostQuitMessage( 0 );
30 }
31 MakePlayer():Creates a new player
32 CleanUp(): Releases DirectX objects & buffers

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