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.

179 lines
3.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995
  5. //
  6. // File: dshrdmem.h
  7. //
  8. // Contents: Contains structure definitons for the significant file
  9. // extensions table classes which the ntsd extensions need
  10. // to access. These ole classes cannot be accessed more
  11. // cleanly because typically the members of interest are private.
  12. //
  13. // WARNING. IF THE REFERENCED OLE CLASSES CHANGE, THEN THESE
  14. // DEFINITIONS MUST CHANGE!
  15. //
  16. // History: 06-01-95 BruceMa Created
  17. //
  18. //--------------------------------------------------------------------------
  19. struct DWORDPAIR
  20. {
  21. DWORD dw1; // IID
  22. DWORD dw2; // CLSID
  23. };
  24. struct GUIDPAIR
  25. {
  26. GUID guid1; // IID
  27. GUID guid2; // CLSID
  28. };
  29. struct GUIDMAP
  30. {
  31. ULONG ulSize; // size of table
  32. ULONG ulFreeSpace; // Free space in table
  33. ULONG ulCntShort; // number of entries in the short list
  34. ULONG ulCntLong; // number of entries in the long list
  35. };
  36. struct SShrdTblHdr
  37. {
  38. DWORD dwSeqNum; // update sequence number
  39. ULONG OffsIIDTbl; // offset of the start of IID table
  40. ULONG OffsPatTbl; // offset to start of file pattern table
  41. ULONG OffsExtTbl; // offset to file extension table
  42. ULONG OffsClsTbl; // offset to start of CLSID table
  43. ULONG pad[1]; // pad to 8 byte boundary
  44. };
  45. struct SSharedMemoryBlock
  46. {
  47. HANDLE _hMem;
  48. BYTE *_pbBase;
  49. ULONG _culCommitSize; // current commit size
  50. ULONG _culInitCommitSize; // initial commit size
  51. BOOL _fCreated; // mem created vs already existed
  52. BOOL _fReadWrite; // want read/write access
  53. };
  54. struct SSmMutex
  55. {
  56. BOOL _fCreated;
  57. HANDLE _hMutex;
  58. };
  59. struct SPSClsidTbl
  60. {
  61. GUIDMAP * _pGuidMap; // ptr to table header
  62. DWORDPAIR * _pShortList; // list of OLE style guids
  63. GUIDPAIR * _pLongList; // list of non OLE style guids
  64. };
  65. struct STblHdr
  66. {
  67. ULONG ulSize; // size of pattern table
  68. ULONG cbLargest; // largest pattern size
  69. ULONG OffsStart; // offset to start of entries
  70. ULONG OffsEnd; // offset to end of entries
  71. };
  72. struct SPatternEntry
  73. {
  74. CLSID clsid; // index of clsid the pattern maps to
  75. ULONG ulEntryLen; // length of this entry
  76. LONG lFileOffset; // offset in file where pattern begins
  77. ULONG ulCb; // count bytes in pattern
  78. BYTE abData[128]; // start of mask & pattern strings
  79. };
  80. struct SPatternTbl
  81. {
  82. STblHdr *_pTblHdr; // ptr to table header struct
  83. BYTE *_pStart; // ptr to first entry in the memory block
  84. };
  85. struct SExtTblHdr
  86. {
  87. ULONG ulSize; // table size
  88. ULONG cEntries; // count of entries in table
  89. ULONG OffsStart; // offset to start of entries
  90. ULONG OffsEnd; // offset to end of entries
  91. };
  92. struct SExtEntry
  93. {
  94. CLSID Clsid; // clsid the extension maps to
  95. ULONG ulEntryLen; // length of this entry
  96. WCHAR wszExt[1]; // start of filename extension
  97. };
  98. struct SFileExtTbl
  99. {
  100. SExtTblHdr *_pTblHdr; // ptr to table header structure
  101. BYTE *_pStart; // ptr to first entry in the memory block
  102. };
  103. struct SDllShrdTbl
  104. {
  105. SSharedMemoryBlock _smb; // shared memory block
  106. SSmMutex _mxs; // shared mutex
  107. HANDLE _hRegEvent; // shared event handle
  108. SPSClsidTbl _PSClsidTbl; // proxy stub clsid table
  109. SPatternTbl _PatternTbl; // file pattern table
  110. SFileExtTbl _FileExtTbl; // file extension table
  111. SShrdTblHdr *_pShrdTblHdr; // shared mem copy of table
  112. DWORD _dwSeqNum; // sequence number
  113. };