// Helper function - Creates the DirectPlay object |
static HRESULT CreateDirectPlayInterface() |
{ |
HRESULT hr; |
// Retrieve a DirectPlay 1.0 interface. |
hr = DirectPlayCreate(lpServiceProviderGuid, &lpDirectPlay1, NULL); |
if FAILED(hr) |
{ |
if (lpDirectPlay1) |
lpDirectPlay1->Release(); |
::MessageBox(NULL,"DirectPlayCreate Failed", "HelloWorld", MB_OK); |
} |
delete lpServiceProviderGuid; |
return (hr); |
} |
CreateDirectPlayInterface(): |
Actually creates the DirectPlay object |
Once we create the DirectPlay |
object, we no longer need the |
service providers GUID |