#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ LpcExitThread()
Definition at line 19 of file close.c.
20{
23
24
26
27
29 {
30
32 }
33
34
36 Thread->LpcReplyMessageId = 0;
37
38
41 {
42
44 }
45
46
48}
static const WCHAR Message[]
#define RemoveEntryList(Entry)
#define IsListEmpty(ListHead)
#define PsGetCurrentThread()
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
FORCEINLINE PLPCP_MESSAGE LpcpGetMessageFromThread(IN PETHREAD Thread)
ULONG LpcExitThreadCalled
Referenced by PspExitThread().
◆ LpcpClosePort()
Definition at line 244 of file close.c.
249{
251
253
254
256 {
257
258 switch (SystemHandleCount)
259 {
260
261 case 0:
262
263
265 break;
266
267
268 case 1:
269
270
272
273
274 default:
275 break;
276 }
277 }
278}
#define LPCTRACE(x, fmt,...)
#define LPCP_CONNECTION_PORT
struct _LPCP_PORT_OBJECT * PLPCP_PORT_OBJECT
#define LPCP_PORT_TYPE_MASK
VOID NTAPI LpcpDestroyPortQueue(IN PLPCP_PORT_OBJECT Port, IN BOOLEAN Destroy)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
Referenced by LpcInitSystem().
◆ LpcpDeletePort()
Definition at line 302 of file close.c.
303{
312
315
317
318
320 {
321
323
324
327 {
328
330
331
334 }
335 else
336 {
337
339 }
340 }
341
342
344 {
345
346 ClientDiedMsg.
h.u1.s1.TotalLength =
sizeof(ClientDiedMsg);
347 ClientDiedMsg.
h.u1.s1.DataLength =
sizeof(ClientDiedMsg.
CreateTime);
348 ClientDiedMsg.
h.u2.ZeroInit = 0;
351
352
353 for (;;)
354 {
355
357 break;
358
359
361 }
362 }
363
364
366
367
368 if ((
Port->ClientSectionBase) || (
Port->ServerSectionBase))
369 {
370
371 if (
Port->ClientSectionBase)
372 {
373
375 Port->ClientSectionBase);
376 }
377
378
379 if (
Port->ServerSectionBase)
380 {
381
383 Port->ServerSectionBase);
384 }
385
386
389 }
390
391
393
394
395 ConnectionPort =
Port->ConnectionPort;
396 if (ConnectionPort)
397 {
398
400
401
403 NextEntry = ListHead->
Flink;
404 while (NextEntry != ListHead)
405 {
406
408 NextEntry = NextEntry->
Flink;
409
410
411 if (
Port == ConnectionPort)
412 {
413
417
418
419 NextEntry = ListHead->
Flink;
420 }
421 else if ((
Message->Request.ClientId.UniqueProcess == Pid) &&
424 (
Message->SenderPort == ConnectionPort)))
425 {
426
430
431
432 NextEntry = ListHead->
Flink;
433 }
434 }
435
436
438
439
441
442
445 {
446
449 }
450 }
451 else
452 {
453
455 }
456
457
460}
NTSTATUS NTAPI MmUnmapViewOfSection(IN PEPROCESS Process, IN PVOID BaseAddress)
#define InitializeListHead(ListHead)
#define KeDelayExecutionThread(mode, foo, t)
#define LPCP_COMMUNICATION_PORT
VOID NTAPI LpcpFreeToPortZone(IN PLPCP_MESSAGE Message, IN ULONG LockFlags)
VOID NTAPI LpcpFreePortClientSecurity(IN PLPCP_PORT_OBJECT Port)
NTSTATUS NTAPI LpcRequestPort(IN PVOID PortObject, IN PPORT_MESSAGE LpcMessage)
HANDLE NTAPI PsGetCurrentProcessId(VOID)
struct _LIST_ENTRY * Flink
LIST_ENTRY LpcDataInfoChainHead
#define CONTAINING_RECORD(address, type, field)
#define ObDereferenceObject
#define PsGetCurrentProcess
Referenced by LpcInitSystem().
◆ LpcpDestroyPortQueue()
Definition at line 111 of file close.c.
113{
120
123
124
126
127
129 (
Port->ConnectedPort))
130 {
131
132 Port->ConnectedPort->ConnectedPort =
NULL;
133 ConnectionPort =
Port->ConnectedPort->ConnectionPort;
134 if (ConnectionPort)
135 {
136
137 Port->ConnectedPort->ConnectionPort =
NULL;
138 }
139 }
140
141
143 {
144
146 }
147
148
149 ListHead = &
Port->LpcReplyChainHead;
150 NextEntry = ListHead->
Flink;
151 while ((NextEntry) && (NextEntry != ListHead))
152 {
153
155
156
158
159
160 NextEntry = NextEntry->
Flink;
161
162
165
166
168 {
169
172 {
173
175 {
176
178
179
181 {
182
184 }
185 }
186
187
189
190
192 NextEntry =
Port->LpcReplyChainHead.Flink;
193 }
194
195
196 Thread->LpcReplyMessageId = 0;
198 }
199 }
200
201
203
204
205 while ((
Port->MsgQueue.ReceiveHead.Flink) &&
207 {
208
212
213
216
217
219 }
220
221
223
224
226
227
228 if (Destroy)
229 {
230
231 if (
Port->MsgQueue.Semaphore)
232 {
233
236 Semaphore);
238 }
239 }
240}
#define LPCP_NAME_DELETED
struct _LPCP_CONNECTION_MESSAGE * PLPCP_CONNECTION_MESSAGE
#define LPCP_UNCONNECTED_PORT
#define ExFreePoolWithTag(_P, _T)
#define LPC_CONNECTION_REQUEST
LONG NTAPI KeReadStateSemaphore(IN PKSEMAPHORE Semaphore)
LONG NTAPI KeReleaseSemaphore(IN PKSEMAPHORE Semaphore, IN KPRIORITY Increment, IN LONG Adjustment, IN BOOLEAN Wait)
Referenced by LpcpClosePort(), and LpcpDeletePort().
◆ LpcpFreePortClientSecurity()
Definition at line 282 of file close.c.
283{
284
286 {
287
289 {
290
291 if (
Port->StaticSecurity.ClientToken)
292 {
293
295 }
296 }
297 }
298}
#define LPCP_SECURITY_DYNAMIC
#define SeDeleteClientSecurity(C)
Referenced by LpcpDeletePort().
◆ LpcpFreeToPortZone()