17{
18 const ULONG MaxHandles = 2048;
27
28
31 ok(
HandleTable.MaximumNumberOfHandles == MaxHandles,
"MaximumNumberOfHandles = %lu\n",
HandleTable.MaximumNumberOfHandles);
33 "SizeOfHandleTableEntry = %lu\n",
HandleTable.SizeOfHandleTableEntry);
40
41
43
46
47 trace(
"CommittedHandles = %p\n", HandleBase);
51
52 ok((
PUCHAR)HandleEntry == HandleBase,
"HandleEntry = %p\n", HandleEntry);
54
55 ok(HandleEntry->
Flags == 0,
"Flags = 0x%lx\n", HandleEntry->
Flags);
56
60
61
63 ok(Valid ==
FALSE,
"Valid = %u\n", Valid);
66 ok(Valid ==
FALSE,
"Valid = %u\n", Valid);
68
71 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
74 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
75 ok(HandleEntry == &
TestEntry->HandleEntry,
"HandleEntry = %p\n", HandleEntry);
76
77
79
84
87
89 ok(TestEntry2->
Data == 0,
"Data = %lu\n", TestEntry2->
Data);
90 TestEntry2->
Data = 0x87604321;
91
94 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
97 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
98 ok(HandleEntry == &TestEntry2->
HandleEntry,
"HandleEntry = %p\n", HandleEntry);
99
100
102 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
103
105 ok((
PUCHAR)HandleEntry == HandleBase,
"HandleEntry = %p\n", HandleEntry);
107 ok(HandleEntry->
Flags == 0,
"Flags = 0x%lx\n", HandleEntry->
Flags);
108
112
114 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
117 ok(Valid ==
TRUE,
"Valid = %u\n", Valid);
118
120
121
122 for (
i = 0;
i < MaxHandles;
i++)
123 {
125
129 "[%lu] HandleEntry = %p\n",
i, HandleEntry);
130
134 if ((
i + 1) % EntriesPerPage == 0)
135 {
137 }
138 else
139 {
141 }
142
146
148 ok(Valid ==
FALSE,
"[%lu] Valid = %u\n",
i, Valid);
151 ok(Valid ==
FALSE,
"[%lu] Valid = %u\n",
i, Valid);
153 }
154
155
158 ok(HandleEntry ==
NULL,
"HandleEntry = %p\n", HandleEntry);
160
161
162 for (
i = 0;
i < MaxHandles;
i++)
163 {
165
167
169
171 ok(Valid ==
TRUE,
"[%lu] Valid = %u\n",
i, Valid);
174 ok(Valid ==
TRUE,
"[%lu] Valid = %u\n",
i, Valid);
175 ok(HandleEntry == &
TestEntry->HandleEntry,
"[%lu] HandleEntry = %p\n",
i, HandleEntry);
176
178 ok(Valid ==
TRUE,
"[%lu] Valid = %u\n",
i, Valid);
179
181 ok(Valid ==
FALSE,
"[%lu] Valid = %u\n",
i, Valid);
184 ok(Valid ==
FALSE,
"[%lu] Valid = %u\n",
i, Valid);
186 }
187
188
193
194
197}
static void TestEntry(const ENTRY *pEntry)
struct _TEST_HANDLE_ENTRY * PTEST_HANDLE_ENTRY
struct _TEST_HANDLE_ENTRY TEST_HANDLE_ENTRY
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static XMS_HANDLE HandleTable[XMS_MAX_HANDLES]
#define RtlFillMemory(Dest, Length, Fill)
NTSYSAPI BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **)
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI BOOLEAN NTAPI RtlFreeHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
NTSYSAPI VOID NTAPI RtlDestroyHandleTable(_Inout_ PRTL_HANDLE_TABLE HandleTable)
NTSYSAPI PRTL_HANDLE_TABLE_ENTRY NTAPI RtlAllocateHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _Inout_ PULONG Index)
NTSYSAPI BOOLEAN NTAPI RtlIsValidHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
RTL_HANDLE_TABLE_ENTRY HandleEntry
_In_ WDFCOLLECTION _In_ ULONG Index