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.

107 lines
3.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995
  5. //
  6. // File: dipid.h
  7. //
  8. // Contents: Contains structure definitons for the significant OXID and
  9. // IPID structures which the ntsd extensions need to access.
  10. // These ole classes cannot be accessed more cleanly because
  11. // typically the members of interest are protected.
  12. //
  13. // WARNING. IF THE REFERENCED OLE CLASSES CHANGE, THEN THESE
  14. // DEFINITIONS MUST CHANGE!
  15. //
  16. // History: 08-11-95 BruceMa Created
  17. //
  18. //--------------------------------------------------------------------------
  19. typedef GUID OXID;
  20. struct IPID
  21. {
  22. WORD offset; // These are reversed because of little-endian
  23. WORD page; // These are reversed because of little-endian
  24. DWORD pid;
  25. DWORD tid;
  26. DWORD seq;
  27. };
  28. struct STRINGARRAY
  29. {
  30. unsigned long size;
  31. unsigned short awszStringArray[1];
  32. };
  33. struct SOXIDEntry
  34. {
  35. struct SOXIDEntry *pPrev; // previous entry on inuse list
  36. struct SOXIDEntry *pNext; // next entry on free/inuse list
  37. DWORD dwPid; // process id of server
  38. DWORD dwTid; // thread id of server
  39. OXID oxid; // object exporter identifier
  40. STRINGARRAY *psa; // ptr to server obj exp string arrary
  41. DWORD dwFlags; // state flags
  42. handle_t hServer; // rpc binding handle of server
  43. void *pRU; // proxy for Remote Unknown
  44. IPID ipidRundown;// IPID of IRundown and Remote Unknown
  45. LONG cRefs; // count of IPIDs using this OXIDEntry
  46. };
  47. typedef enum tagOXIDFLAGS
  48. {
  49. OXIDF_REGISTERED = 1, // oxid is registered with Resolver
  50. OXIDF_MACHINE_LOCAL = 2, // oxid is local to this machine
  51. OXIDF_STOPPED = 4, // thread can no longer receive calls
  52. OXIDF_PENDINGRELEASE= 8 // oxid entry is already being released
  53. } OXIDFLAGS;
  54. #define OXIDTBL_PAGESIZE 4096
  55. // Forward reference
  56. struct SRpcChannelBuffer;
  57. struct SIPIDEntry
  58. {
  59. IPID ipid; // interface pointer identifier
  60. IID iid; // interface iid
  61. SRpcChannelBuffer *pChnl; // channel pointer
  62. IUnknown *pStub; // proxy or stub pointer
  63. void *pv; // real interface pointer
  64. SOXIDEntry *pOXIDEntry; // ptr to OXIDEntry in OXID Table
  65. DWORD dwFlags; // flags (see IPIDFLAGS)
  66. ULONG cStrongRefs;// strong reference count
  67. ULONG cWeakRefs; // weak reference count
  68. LONG iNextOID; // next entry in this table for same object
  69. };
  70. typedef enum tagIPIDFLAGS
  71. {
  72. IPIDF_CONNECTING = 1, // ipid is being connected
  73. IPIDF_DISCONNECTED = 2, // ipid is disconnected
  74. IPIDF_SERVERENTRY = 4, // SERVER IPID vs CLIENT IPID
  75. IPIDF_NOPING = 8, // dont need to ping the server or release
  76. IPIDF_VACANT = 128 // entry is vacant (ie available to reuse)
  77. } IPIDFLAGS;
  78. #define IPIDTBL_PAGESIZE 4096
  79. #define IPIDTBL_PAGESHIFT 16
  80. #define IPIDTBL_PAGEMASK 0x0000ffff
  81. #define IPIDsPerPage (IPIDTBL_PAGESIZE / sizeof(SIPIDEntry))