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.

156 lines
3.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: obj16.hxx
  7. //
  8. // Contents: 16->32 object definition header
  9. //
  10. // History: 23-Mar-94 JohannP Created
  11. // 22-May-94 BobDay Split thkmgr.hxx into a mode
  12. // independent file
  13. //
  14. // WARNING: THIS HEADER FILE IS INCLUDED IN BOTH 16-bit CODE and 32-bit CODE
  15. // ANY DECLARATIONS SHOULD BE MODE NEUTRAL.
  16. //
  17. //----------------------------------------------------------------------------
  18. #ifndef __OBJ16_HXX__
  19. #define __OBJ16_HXX__
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Structure: PROXYPTR (pprx)
  23. //
  24. // Purpose: A 16:16 or 32-bit pointer to a proxy
  25. //
  26. // History: 15-Jul-94 DrewB Created
  27. //
  28. //----------------------------------------------------------------------------
  29. #define PPRX_NONE 0
  30. #define PPRX_16 1
  31. #define PPRX_32 2
  32. struct PROXYPTR
  33. {
  34. PROXYPTR(void)
  35. {
  36. };
  37. PROXYPTR(DWORD dwVal, DWORD wTy)
  38. {
  39. dwPtrVal = dwVal;
  40. wType = wTy;
  41. };
  42. DWORD dwPtrVal;
  43. DWORD wType;
  44. };
  45. //+---------------------------------------------------------------------------
  46. //
  47. // Structure: PROXYHOLDER (ph)
  48. //
  49. // Purpose: Provides object identity for multiple proxies
  50. //
  51. // History: 07-Jul-94 DrewB Created
  52. //
  53. //----------------------------------------------------------------------------
  54. class CProxy;
  55. // Proxy holder flags
  56. #define PH_NORMAL 0x01
  57. #define PH_AGGREGATEE 0x02
  58. #define PH_AGGREGATOR 0x04
  59. #define PH_IDREVOKED 0x08
  60. typedef struct tagPROXYHOLDER
  61. {
  62. LONG cProxies;
  63. DWORD dwFlags;
  64. PROXYPTR unkProxy;
  65. PROXYPTR pprxProxies;
  66. } PROXYHOLDER;
  67. //+---------------------------------------------------------------------------
  68. //
  69. // Class: CProxy (prx)
  70. //
  71. // Purpose: Common proxy data
  72. //
  73. // History: 07-Jul-94 DrewB Created
  74. //
  75. //----------------------------------------------------------------------------
  76. #if DBG == 1
  77. // Define some signatures for doing proxy memory validation
  78. #define PSIG1632 0x16320000
  79. #define PSIG1632DEAD 0x1632DEAD
  80. #define PSIG1632TEMP 0x16321632
  81. #define PSIG3216 0x32160000
  82. #define PSIG3216DEAD 0x3216DEAD
  83. #endif
  84. #define PROXYFLAG_STATUS 0x000f
  85. #define PROXYFLAG_NORMAL 0x0000
  86. #define PROXYFLAG_LOCKED 0x0001
  87. #define PROXYFLAG_TEMPORARY 0x0002
  88. #define PROXYFLAG_CLEANEDUP 0x0004
  89. #define PROXYFLAG_REVIVED 0x0008
  90. #define PROXYFLAG_TYPE 0x00f0
  91. #define PROXYFLAG_NONE 0x0000
  92. #define PROXYFLAG_PUNKOUTER 0x0010
  93. #define PROXYFLAG_PUNKINNER 0x0020
  94. #define PROXYFLAG_PUNK 0x0040
  95. #define PROXYFLAG_PIFACE 0x0080
  96. class CProxy
  97. {
  98. public:
  99. // Vtable pointer
  100. DWORD pfnVtbl;
  101. // References passed on to the real object
  102. LONG cRef;
  103. // Proxy ref count
  104. LONG cRefLocal;
  105. // Interface being proxied
  106. // Currently the iidx here is always an index
  107. IIDIDX iidx;
  108. // Object that this proxy is part of
  109. PROXYHOLDER FAR *pphHolder;
  110. // Sibling proxy pointer within an object
  111. PROXYPTR pprxObject;
  112. // Flags, combines with word in PROXYPTR for alignment
  113. DWORD grfFlags;
  114. #if DBG == 1
  115. DWORD dwSignature;
  116. #endif
  117. };
  118. // 16->32 proxy
  119. class CProxy1632 : public CProxy
  120. {
  121. public:
  122. LPUNKNOWN punkThis32;
  123. };
  124. // 32->16 proxy
  125. class CProxy3216 : public CProxy
  126. {
  127. public:
  128. DWORD vpvThis16;
  129. };
  130. typedef CProxy1632 THUNK1632OBJ;
  131. typedef CProxy3216 THUNK3216OBJ;
  132. #endif // #ifndef __OBJ16_HXX__