Leaked source code of windows server 2003
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.

68 lines
1.9 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. * 1/12/99 aarono added support for rsip
  15. *
  16. ***************************************************************************/
  17. #ifndef __DPLAYSVR_INCLUDED__
  18. #define __DPLAYSVR_INCLUDED__
  19. // need this for hresult
  20. #include "ole2.h"
  21. #define USE_RSIP 0
  22. #define USE_NATHELP 1
  23. // crit section
  24. extern CRITICAL_SECTION gcsCritSection; // defined in dphelp.c
  25. #define INIT_DPLAYSVR_CSECT() InitializeCriticalSection(&gcsCritSection);
  26. #define FINI_DPLAYSVR_CSECT() DeleteCriticalSection(&gcsCritSection);
  27. #ifdef DEBUG
  28. extern int gnCSCount; // count of dplaysvr lock
  29. #define ENTER_DPLAYSVR() EnterCriticalSection(&gcsCritSection),gnCSCount++;
  30. #define LEAVE_DPLAYSVR() gnCSCount--;ASSERT(gnCSCount>=0);LeaveCriticalSection(&gcsCritSection);
  31. #else
  32. #define ENTER_DPLAYSVR() EnterCriticalSection(&gcsCritSection);
  33. #define LEAVE_DPLAYSVR() LeaveCriticalSection(&gcsCritSection);
  34. #endif
  35. /*
  36. * named objects
  37. */
  38. #define DPHELP_EVENT_NAME "__DPHelpEvent__"
  39. #define DPHELP_ACK_EVENT_NAME "__DPHelpAckEvent__"
  40. #define DPHELP_STARTUP_EVENT_NAME "__DPHelpStartupEvent__"
  41. #define DPHELP_SHARED_NAME "__DPHelpShared__"
  42. #define DPHELP_MUTEX_NAME "__DPHelpMutex__"
  43. /*
  44. * requests
  45. */
  46. #define DPHELPREQ_SUICIDE 1
  47. #define DPHELPREQ_DPLAYADDSERVER 2
  48. #define DPHELPREQ_DPLAYDELETESERVER 3
  49. #define DPHELPREQ_RETURNHELPERPID 4
  50. /*
  51. * communication data
  52. */
  53. typedef struct DPHELPDATA
  54. {
  55. int req;
  56. DWORD pid;
  57. USHORT port;
  58. HRESULT hr;
  59. } DPHELPDATA, *LPDPHELPDATA;
  60. #endif