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.

133 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. soxid.hxx
  5. Abstract:
  6. CServerOxid objects represent OXIDs which are owned (registered) by processes
  7. on this machine. These always contain a pointer to a local process and may not
  8. be deleted until the local process has exited and all CServerOids have released
  9. them.
  10. Author:
  11. Mario Goertzel [MarioGo]
  12. Revision History:
  13. MarioGo 02-16-95 Bits 'n pieces
  14. MarioGo 04-03-95 Split client and server
  15. --*/
  16. #ifndef __SOXID_HXX
  17. #define __SOXID_HXX
  18. class CServerOxid : public CIdTableElement
  19. /*++
  20. Class Description:
  21. Each instance of this class represents an OXID (object exporter,
  22. a process or an apartment model thread). Each OXID is owned,
  23. referenced, by the owning process and the OIDs registered by
  24. that process for this OXID.
  25. Members:
  26. _pProcess - Pointer to the process instance which owns this oxid.
  27. _info - Info registered by the process for this oxid.
  28. _fApartment - Server is aparment model if non-zero
  29. _fRunning - Process has not released this oxid if non-zero.
  30. _fRundownInProgress - TRUE if an asynchronous rundown call is
  31. currently in-progress, FALSE otherwise.
  32. --*/
  33. {
  34. friend CProcess;
  35. private:
  36. CProcess *_pProcess;
  37. OXID_INFO _info;
  38. BOOL _fApartment:1;
  39. BOOL _fRunning:1;
  40. BOOL _fRundownInProgress:1;
  41. public:
  42. CServerOxid(CProcess *pProcess,
  43. BOOL fApartment,
  44. OXID_INFO *poxidInfo) :
  45. CIdTableElement(AllocateId()),
  46. _pProcess(pProcess),
  47. _fApartment(fApartment),
  48. _fRunning(TRUE),
  49. _fRundownInProgress(FALSE)
  50. {
  51. _info.dwTid = poxidInfo->dwTid;
  52. _info.dwPid = poxidInfo->dwPid;
  53. _info.dwAuthnHint = poxidInfo->dwAuthnHint;
  54. _info.version = poxidInfo->version;
  55. _info.ipidRemUnknown = poxidInfo->ipidRemUnknown;
  56. _info.psa = 0;
  57. _pProcess->Reference();
  58. }
  59. ~CServerOxid(void);
  60. void ProcessRundownResults(ULONG cOids,
  61. CServerOid* aOids[],
  62. BYTE aRundownStatus[]);
  63. DWORD GetTid() {
  64. return(_info.dwTid);
  65. }
  66. BOOL IsRunning() {
  67. return(_fRunning);
  68. }
  69. BOOL Apartment() {
  70. return(_fApartment);
  71. }
  72. ORSTATUS GetInfo(OXID_INFO *,
  73. BOOL fLocal);
  74. IPID GetIPID() {
  75. return _info.ipidRemUnknown;
  76. }
  77. void RundownOids(ULONG cOids,
  78. CServerOid* aOids[]);
  79. ORSTATUS GetRemoteInfo(OXID_INFO *,
  80. USHORT,
  81. USHORT[]);
  82. ORSTATUS LazyUseProtseq(USHORT, USHORT[]);
  83. protected:
  84. void ProcessRelease(void);
  85. void ProcessRundownResultsInternal(BOOL fAsyncReturn,
  86. ULONG cOids,
  87. CServerOid* aOids[],
  88. BYTE aRundownStatus[]);
  89. };
  90. #endif // __SOXID_HXX