//Initialize DirectX components |
static BOOL DXInit() |
{ |
HRESULT hr; |
DDSURFACEDESC ddsd; // Structures needed for Surfaces |
DDSCAPS ddscaps; |
//-----------Set up Direct Play------------------ |
// Get the service provider you want to use |
DirectPlayEnumerate(DirectPlayEnumerateCallback, hwndApp); |
// Create the DirectPlay object |
CreateDirectPlayInterface(); |
// If you want to join a session, find it |
if(joinSession) |
FindSession(); |
// Join/Create a session |
OpenSession(); |
// Create a player |
MakePlayer(); |
DXInit(): |
Initializes & sets up the DirectX |
part of our application |
Setting up |
DirectPlay |
Continued... |