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.

114 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1995-1997 Microsoft Corporation
  3. Module Name:
  4. surrogat.hxx
  5. Abstract:
  6. Author:
  7. DKays
  8. Revision History:
  9. --*/
  10. #ifndef __SURROGAT_HXX__
  11. #define __SURROGAT_HXX__
  12. class CSurrogateList;
  13. class CSurrogateListEntry;
  14. extern CSurrogateList * gpSurrogateList;
  15. //
  16. // CSurrogateList
  17. //
  18. class CSurrogateList : public CList
  19. {
  20. public:
  21. CSurrogateListEntry *
  22. Lookup(
  23. IN CToken * pToken,
  24. IN BOOL bRemoteActivation,
  25. IN BOOL bClientImpersonating,
  26. IN WCHAR * pwszWinstaDesktop,
  27. IN WCHAR * pwszAppid
  28. );
  29. CSurrogateListEntry *
  30. Lookup(
  31. IN const CProcess * pProcess
  32. );
  33. void
  34. Insert(
  35. IN CSurrogateListEntry * pServerListEntry
  36. );
  37. BOOL
  38. InList(
  39. IN CSurrogateListEntry * pSurrogateListEntry
  40. );
  41. BOOL
  42. RemoveMatchingEntry(
  43. IN CServerListEntry* pServerListEntry
  44. );
  45. };
  46. //
  47. // CSurrogateListEntry
  48. //
  49. class CSurrogateListEntry : public CListElement, public CReferencedObject
  50. {
  51. friend class CSurrogateList;
  52. public:
  53. CSurrogateListEntry(
  54. IN WCHAR * pwszAppid,
  55. IN CServerListEntry * pServerListEntry
  56. );
  57. ~CSurrogateListEntry();
  58. BOOL
  59. Match(
  60. IN CToken * pToken,
  61. IN BOOL bRemoteActivation,
  62. IN BOOL bClientImpersonating,
  63. IN WCHAR * pwszWinstaDesktop,
  64. IN WCHAR * pwszAppid
  65. );
  66. BOOL
  67. LoadDll(
  68. IN ACTIVATION_PARAMS * pActParams,
  69. OUT HRESULT * phr
  70. );
  71. inline CServerListEntry *
  72. ServerListEntry()
  73. {
  74. _pServerListEntry->Reference();
  75. return _pServerListEntry;
  76. }
  77. inline CProcess *
  78. Process()
  79. {
  80. return _pServerListEntry->_pServerProcess;
  81. }
  82. private:
  83. CServerListEntry * _pServerListEntry;
  84. WCHAR _wszAppid[40];
  85. };
  86. #endif