DPCHAT.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dpchat.h
  6.  *  Content: Header file for dpchat.cpp
  7.  *
  8.  ***************************************************************************/
  9. #define IDIRECTPLAY2_OR_GREATER
  10. #include <dplay.h>
  11. // constants
  12. const DWORD MAXPLAYERS = 10; // max no. players in the session
  13. // structure used to store DirectPlay information
  14. typedef struct {
  15. LPDIRECTPLAY3A lpDirectPlay3A; // IDirectPlay3A interface pointer
  16. HANDLE hPlayerEvent; // player event to use
  17. DPID dpidPlayer; // ID of player created
  18. BOOL bIsHost; // TRUE if we are hosting the session
  19. } DPLAYINFO, *LPDPLAYINFO;
  20. // guid for this application
  21. // {5BFDB060-06A4-11d0-9C4F-00A0C905425E}
  22. DEFINE_GUID(DPCHAT_GUID, 
  23. 0x5bfdb060, 0x6a4, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  24. // prototypes
  25. extern HRESULT ConnectUsingLobby(LPDPLAYINFO lpDPInfo);
  26. extern HRESULT ConnectUsingDialog(HINSTANCE hInstance, LPDPLAYINFO lpDPInfo);
  27. extern void ErrorBox(LPSTR lpszErrorStr, HRESULT hr);