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.

67 lines
3.3 KiB

  1. //****************************************************************************
  2. //
  3. // File: sempahor.h
  4. //
  5. // Content: This is the include file that contains the semaphore names
  6. // used by the various ICW components to ensure that only
  7. // one component is running at a time
  8. // (with the following expections:
  9. // -- with icwconn1 running, isignup and icwconn2 can execute.
  10. // -- with isignup running, icwconn2 can execute.
  11. //
  12. // History:
  13. // 12/3/96 jmazner Created for Normandy bugs 12140, 12088
  14. //
  15. //
  16. // Copyright (c) Microsoft Corporation 1996
  17. //
  18. //****************************************************************************
  19. #define ICWCONN1_SEMAPHORE TEXT("Internet Connection Wizard ICWCONN1.EXE")
  20. #define ICW_ELSE_SEMAPHORE TEXT("Internet Connection Wizard Non ICWCONN1 Component")
  21. #define DIALOG_CLASS_NAME TEXT("#32770")
  22. BOOL IsAnotherComponentRunning32(BOOL bCreatedSemaphore);
  23. /******
  24. Allow this component to execute?
  25. /------------------------------------------------------------\
  26. | ICWCONN1 | ISIGNUP | ISIGN.INS | ICWCONN2 | INETWIZ
  27. / --------|-------------------------------------------------------------
  28. | | | | | |
  29. | ICWCONN1| no | _YES_ | _YES_ | _YES_ | no
  30. | | | | | |
  31. | --------|-----------|-----------|-----------|-----------|--------------
  32. if this | | | | | |
  33. component | ISIGNUP | no | no | _YES_ | _YES_ | no
  34. is running | | | | | |
  35. | --------|-----------|-----------|-----------|-----------|--------------
  36. | | | | | |
  37. | ISIGNUP | no | no | _YES_ | _YES_ | no
  38. | .INS | | | | |
  39. | --------|-----------|-----------|-----------|-----------|--------------
  40. | | | | | |
  41. | ICWCONN2| no | no | _YES_ | _YES_ | no
  42. | | | | | |
  43. | --------|-----------|-----------|-----------|-----------|--------------
  44. | | | | | |
  45. | INETWIZ | no | no | _YES_ | _YES_ | no
  46. | | | | | |
  47. \ --------|-----------|-----------|-----------|-----------|--------------
  48. Implement this using two semaphores, one for ICWCONN1, and one for everything else (ICW_ELSE)
  49. On startup, each component set its semaphore, then checks what other components are running.
  50. Conn1: check for ICWCONN1, ICW_ELSE
  51. Isignup: check for ICW_ELSE
  52. Isignup .ins: no checks
  53. ICWCONN2: no checks
  54. Inetwiz: Check for ICWCONN1, ICW_ELSE
  55. ******/