summaryrefslogtreecommitdiffstats
path: root/private/ole32/dbgexts/dshrdmem.h
blob: 27aa83adce39e6217aad5868485af98aac88e066 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1995
//
//  File:       dshrdmem.h
//
//  Contents:   Contains structure definitons for the significant file
//              extensions table classes which the ntsd extensions need
//              to access.  These ole classes cannot be accessed more
//              cleanly because typically the members of interest are private.
//
//              WARNING.  IF THE REFERENCED OLE CLASSES CHANGE, THEN THESE
//              DEFINITIONS MUST CHANGE!
//
//  History:    06-01-95 BruceMa    Created
//
//--------------------------------------------------------------------------





struct DWORDPAIR
{
    DWORD   dw1;		    // IID
    DWORD   dw2;		    // CLSID
};




struct GUIDPAIR
{
    GUID    guid1;		    // IID
    GUID    guid2;		    // CLSID
};




struct GUIDMAP
{
    ULONG	ulSize; 	    // size of table
    ULONG	ulFreeSpace;	    // Free space in table
    ULONG	ulCntShort;	    // number of entries in the short list
    ULONG	ulCntLong;	    // number of entries in the long list
};



struct	SShrdTblHdr
{
    DWORD	dwSeqNum;	// update sequence number
    ULONG	OffsIIDTbl;	// offset of the start of IID table
    ULONG	OffsPatTbl;	// offset to start of file pattern table
    ULONG	OffsExtTbl;	// offset to file extension table
    ULONG	OffsClsTbl;	// offset to start of CLSID table
    ULONG	pad[1];		// pad to 8 byte boundary
};




struct SSharedMemoryBlock
{
    HANDLE _hMem;
    BYTE *_pbBase;
    ULONG _culCommitSize;	    //	current commit size
    ULONG _culInitCommitSize;	    //	initial commit size
    BOOL _fCreated;		    //	mem created vs already existed
    BOOL _fReadWrite;		    //	want read/write access
};




struct SSmMutex
{
    BOOL		_fCreated;
    HANDLE		_hMutex;
};




struct SPSClsidTbl
{
    GUIDMAP   *	_pGuidMap;	// ptr to table header
    DWORDPAIR * _pShortList;	// list of OLE style guids
    GUIDPAIR  *	_pLongList;	// list of non OLE style guids
};




struct STblHdr
{
    ULONG	ulSize; 	//  size of pattern table
    ULONG	cbLargest;	//  largest pattern size
    ULONG	OffsStart;	//  offset to start of entries
    ULONG	OffsEnd;	//  offset to end of entries
};




struct SPatternEntry
{
    CLSID	clsid;		//  index of clsid the pattern maps to
    ULONG	ulEntryLen;	//  length of this entry
    LONG	lFileOffset;	//  offset in file where pattern begins
    ULONG	ulCb;		//  count bytes in pattern
    BYTE	abData[128];	//  start of mask & pattern strings
};




struct SPatternTbl
{
    STblHdr	   *_pTblHdr;	//  ptr to table header struct
    BYTE	   *_pStart;	//  ptr to first entry in the memory block
};




struct SExtTblHdr
{
    ULONG   ulSize;		//  table size
    ULONG   cEntries;		//  count of entries in table
    ULONG   OffsStart;		//  offset to start of entries
    ULONG   OffsEnd;		//  offset to end of entries
};





struct SExtEntry
{
    CLSID	Clsid;		//  clsid the extension maps to
    ULONG	ulEntryLen;	//  length of this entry
    WCHAR	wszExt[1];	//  start of filename extension
};





struct  SFileExtTbl
{
    SExtTblHdr	   *_pTblHdr;	//  ptr to table header structure
    BYTE	   *_pStart;	//  ptr to first entry in the memory block
};




struct SDllShrdTbl
{
    SSharedMemoryBlock	_smb;		// shared memory block
    SSmMutex		_mxs;		// shared mutex
    HANDLE		_hRegEvent;	// shared event handle

    SPSClsidTbl 	_PSClsidTbl;	// proxy stub clsid table
    SPatternTbl 	_PatternTbl;	// file pattern table
    SFileExtTbl 	_FileExtTbl;	// file extension table

    SShrdTblHdr	       *_pShrdTblHdr;	// shared mem copy of table
    DWORD		_dwSeqNum;	// sequence number
};