Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.8 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dplaysvr.h
  6. * Content: dplay winsock shared .exe - allows multiple apps to share
  7. * a single winsock port
  8. *
  9. * History:
  10. * Date By Reason
  11. * ==== == ======
  12. * 2/10/97 andyco created it from ddhelp
  13. * 1/29/98 sohailm added macros for critical section
  14. *
  15. ***************************************************************************/
  16. #ifndef __DPLAYSVR_INCLUDED__
  17. #define __DPLAYSVR_INCLUDED__
  18. // need this for hresult
  19. #include "ole2.h"
  20. // crit section
  21. extern CRITICAL_SECTION gcsCritSection; // defined in dphelp.c
  22. #define INIT_DPLAYSVR_CSECT() InitializeCriticalSection(&gcsCritSection);
  23. #define FINI_DPLAYSVR_CSECT() DeleteCriticalSection(&gcsCritSection);
  24. #ifdef DEBUG
  25. extern int gnCSCount; // count of dplaysvr lock
  26. #define ENTER_DPLAYSVR() EnterCriticalSection(&gcsCritSection),gnCSCount++;
  27. #define LEAVE_DPLAYSVR() gnCSCount--;ASSERT(gnCSCount>=0);LeaveCriticalSection(&gcsCritSection);
  28. #else
  29. #define ENTER_DPLAYSVR() EnterCriticalSection(&gcsCritSection);
  30. #define LEAVE_DPLAYSVR() LeaveCriticalSection(&gcsCritSection);
  31. #endif
  32. /*
  33. * named objects
  34. */
  35. #define DPHELP_EVENT_NAME "__DPHelpEvent__"
  36. #define DPHELP_ACK_EVENT_NAME "__DPHelpAckEvent__"
  37. #define DPHELP_STARTUP_EVENT_NAME "__DPHelpStartupEvent__"
  38. #define DPHELP_SHARED_NAME "__DPHelpShared__"
  39. #define DPHELP_MUTEX_NAME "__DPHelpMutex__"
  40. /*
  41. * requests
  42. */
  43. #define DPHELPREQ_SUICIDE 1
  44. #define DPHELPREQ_DPLAYADDSERVER 2
  45. #define DPHELPREQ_DPLAYDELETESERVER 3
  46. #define DPHELPREQ_RETURNHELPERPID 4
  47. /*
  48. * communication data
  49. */
  50. typedef struct DPHELPDATA
  51. {
  52. int req;
  53. DWORD pid;
  54. USHORT port;
  55. HRESULT hr;
  56. } DPHELPDATA, *LPDPHELPDATA;
  57. #endif