ReactOS  0.4.14-dev-1233-gf5658fd
rxprocs.h
Go to the documentation of this file.
1 #ifndef _RDBSSPROCS_
2 #define _RDBSSPROCS_
3 
4 #include "backpack.h"
5 #include "rxlog.h"
6 #include "rxtimer.h"
7 #include "rxstruc.h"
8 
9 extern PVOID RxNull;
10 
11 #define RxLogFailure(DO, Originator, Event, Status) \
12  RxLogEventDirect(DO, Originator, Event, Status, __LINE__)
13 
14 VOID
15 NTAPI
18  _In_ PUNICODE_STRING OriginatorId,
19  _In_ ULONG EventId,
21  _In_ ULONG Line);
22 
23 VOID
24 NTAPI
27  _In_ ULONG EventId,
29  _In_ PVOID DataBuffer,
31  _In_ PUNICODE_STRING Annotation,
32  _In_ ULONG AnnotationCount);
33 
36  _In_ PRX_CONTEXT RxContext);
37 
38 VOID
40  _In_ PRX_CONTEXT RxContext);
41 
44  _In_ PRX_CONTEXT RxContext);
45 
46 LUID
47 RxGetUid(
49 
50 ULONG
53 
54 #if (_WIN32_WINNT >= 0x0600)
57  _In_ PRX_CONTEXT RxContext,
58  _In_ PIRP Irp,
59  _In_ PUNICODE_STRING CanonicalName,
60  _In_ NET_ROOT_TYPE NetRootType,
61  _In_ BOOLEAN TreeConnect,
62  _Out_ PUNICODE_STRING LocalNetRootName,
63  _Out_ PUNICODE_STRING FilePathName,
65  _In_ PRX_CONNECTION_ID RxConnectionId);
66 #else
69  _In_ PRX_CONTEXT RxContext,
70  _In_ PUNICODE_STRING CanonicalName,
71  _In_ NET_ROOT_TYPE NetRootType,
72  _Out_ PUNICODE_STRING LocalNetRootName,
73  _Out_ PUNICODE_STRING FilePathName,
75  _In_ PRX_CONNECTION_ID RxConnectionId);
76 #endif
77 
79 {
84 
85 VOID
88  _Inout_ PFOBX Fobx,
89  _Out_ PULONG ActualNameLength,
90  _Out_writes_bytes_( *LengthRemaining) PWCHAR OriginalName,
91  _Inout_ PLONG LengthRemaining,
92  _In_ RX_NAME_CONJURING_METHODS NameConjuringMethod);
93 
94 #if (_WIN32_WINNT >= 0x0600)
97  _In_ PRX_CONTEXT RxContext,
98  _In_ PIRP Irp);
99 #else
100 NTSTATUS
101 NTAPI
103  _In_ PRX_CONTEXT RxContext);
104 #endif
105 
106 #if (_WIN32_WINNT >= 0x0600)
107 VOID
109  _In_ PRX_CONTEXT RxContext,
110  _In_ PIRP Irp,
113 
114 PVOID
116  _In_ PRX_CONTEXT RxContext,
117  _In_ PIRP Irp);
118 #else
119 VOID
121  _In_ PRX_CONTEXT RxContext,
124 
125 PVOID
127  _In_ PRX_CONTEXT RxContext);
128 #endif
129 
130 #define FCB_MODE_EXCLUSIVE 1
131 #define FCB_MODE_SHARED 2
132 #define FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE 3
133 #define FCB_MODE_SHARED_STARVE_EXCLUSIVE 4
134 
135 #define CHANGE_BUFFERING_STATE_CONTEXT ((PRX_CONTEXT)IntToPtr(0xffffffff))
136 #define CHANGE_BUFFERING_STATE_CONTEXT_WAIT ((PRX_CONTEXT)IntToPtr(0xfffffffe))
137 
138 NTSTATUS
140  _Inout_ PFCB Fcb,
141  _Inout_opt_ PRX_CONTEXT RxContext,
142  _In_ ULONG Mode
143 #ifdef RDBSS_TRACKER
144  ,
148 #endif
149  );
150 
151 #ifdef RDBSS_TRACKER
152 #define RxAcquireExclusiveFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_EXCLUSIVE, __LINE__, __FILE__, 0)
153 #else
154 #define RxAcquireExclusiveFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_EXCLUSIVE)
155 #endif
156 
157 #define RX_GET_MRX_FCB(F) ((PMRX_FCB)((F)))
158 
159 #ifdef RDBSS_TRACKER
160 #define RxAcquireSharedFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED, __LINE__, __FILE__, 0)
161 #else
162 #define RxAcquireSharedFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED)
163 #endif
164 
165 #ifdef RDBSS_TRACKER
166 #define RxAcquireSharedFcbWaitForEx(R, F) __RxAcquireFcb((F),(R), FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE, __LINE__, __FILE__,0)
167 #else
168 #define RxAcquireSharedFcbWaitForEx(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE)
169 #endif
170 
171 VOID
173  _Inout_opt_ PRX_CONTEXT RxContext,
174  _Inout_ PMRX_FCB MrxFcb
175 #ifdef RDBSS_TRACKER
176  ,
180 #endif
181  );
182 
183 #ifdef RDBSS_TRACKER
184 #define RxReleaseFcb(R, F) __RxReleaseFcb((R), RX_GET_MRX_FCB(F), __LINE__, __FILE__, 0)
185 #else
186 #define RxReleaseFcb(R, F) __RxReleaseFcb((R), RX_GET_MRX_FCB(F))
187 #endif
188 
189 VOID
191  _Inout_opt_ PRX_CONTEXT RxContext,
192  _Inout_ PMRX_FCB MrxFcb,
194 #ifdef RDBSS_TRACKER
195  ,
199 #endif
200  );
201 
202 #ifdef RDBSS_TRACKER
203 #define RxReleaseFcbForThread(R, F, T) __RxReleaseFcbForThread((R), RX_GET_MRX_FCB(F), (T), __LINE__, __FILE__, 0)
204 #else
205 #define RxReleaseFcbForThread(R, F, T) __RxReleaseFcbForThread((R), RX_GET_MRX_FCB(F), (T))
206 #endif
207 
208 #ifdef RDBSS_TRACKER
209 VOID
211  _Inout_opt_ PRX_CONTEXT RxContext,
212  _Inout_ PMRX_FCB MrxFcb,
217 #else
218 #define RxTrackerUpdateHistory(R, F, O, L, F, S) { NOTHING; }
219 #endif
220 
221 VOID
224  _In_ ULONG Type,
225  _In_ ULONG Line,
226  _In_ PCSTR File);
227 
228 #define RxIsFcbAcquiredShared(Fcb) ExIsResourceAcquiredSharedLite((Fcb)->Header.Resource)
229 #define RxIsFcbAcquiredExclusive(Fcb) ExIsResourceAcquiredExclusiveLite((Fcb)->Header.Resource)
230 #define RxIsFcbAcquired(Fcb) (ExIsResourceAcquiredSharedLite((Fcb)->Header.Resource) || \
231  ExIsResourceAcquiredExclusiveLite((Fcb)->Header.Resource))
232 
233 #define RxAcquirePagingIoResource(RxContext, Fcb) \
234  ExAcquireResourceExclusiveLite((Fcb)->Header.PagingIoResource, TRUE); \
235  if (RxContext != NULL) \
236  { \
237  (RxContext)->FcbPagingIoResourceAcquired = TRUE; \
238  } \
239  RxTrackPagingIoResource(Fcb, 1, __LINE__, __FILE__)
240 
241 #ifndef __REACTOS__
242 #define RxAcquirePagingIoResourceShared(RxContext, Fcb, Flag) \
243  ExAcquireResourceSharedLite((Fcb)->Header.PagingIoResource, Flag); \
244  if (AcquiredFile) \
245  { \
246  if (RxContext != NULL) \
247  { \
248  ((PRX_CONTEXT)RxContext)->FcbPagingIoResourceAcquired = TRUE; \
249  } \
250  RxTrackPagingIoResource(Fcb, 2, __LINE__, __FILE__); \
251  }
252 #else
253 #define RxAcquirePagingIoResourceShared(RxContext, Fcb, Flag) \
254  { \
255  BOOLEAN AcquiredFile; \
256  AcquiredFile = ExAcquireResourceSharedLite((Fcb)->Header.PagingIoResource, Flag); \
257  if (AcquiredFile) \
258  { \
259  if (RxContext != NULL) \
260  { \
261  ((PRX_CONTEXT)RxContext)->FcbPagingIoResourceAcquired = TRUE; \
262  } \
263  RxTrackPagingIoResource(Fcb, 2, __LINE__, __FILE__); \
264  } \
265  }
266 #endif
267 
268 #define RxReleasePagingIoResource(RxContext, Fcb) \
269  RxTrackPagingIoResource(Fcb, 3, __LINE__, __FILE__); \
270  if (RxContext != NULL) \
271  { \
272  (RxContext)->FcbPagingIoResourceAcquired = FALSE; \
273  } \
274  ExReleaseResourceLite((Fcb)->Header.PagingIoResource)
275 
276 #define RxReleasePagingIoResourceForThread(RxContext, Fcb, Thread) \
277  RxTrackPagingIoResource(Fcb, 3, __LINE__, __FILE__); \
278  if (RxContext != NULL) \
279  { \
280  (RxContext)->FcbPagingIoResourceAcquired = FALSE; \
281  } \
282  ExReleaseResourceForThreadLite((Fcb)->Header.PagingIoResource, (Thread))
283 
284 #ifdef __REACTOS__
285 VOID
287  PRX_CONTEXT RxContext,
288  BOOLEAN ResourceOwnerSet
289 #ifdef RDBSS_TRACKER
290  ,
292  PCSTR FileName,
294 #endif
295  );
296 
297 #ifdef RDBSS_TRACKER
298 #define RxWriteReleaseResources(R, B) __RxWriteReleaseResources((R), (B), __LINE__, __FILE__, 0)
299 #else
300 #define RxWriteReleaseResources(R, B) __RxWriteReleaseResources((R), (B))
301 #endif
302 #endif
303 
304 BOOLEAN
305 NTAPI
307  _In_ PVOID Null,
308  _In_ BOOLEAN Wait);
309 
310 VOID
311 NTAPI
313  _In_ PVOID Null);
314 
315 BOOLEAN
316 NTAPI
318  _In_ PVOID Null,
319  _In_ BOOLEAN Wait);
320 
321 VOID
322 NTAPI
324  _In_ PVOID Null);
325 
326 BOOLEAN
327 NTAPI
329  _In_ PVOID Fcb,
330  _In_ BOOLEAN Wait);
331 
332 VOID
333 NTAPI
335  _In_ PVOID Fcb);
336 
337 #define RxConvertToSharedFcb(R, F) ExConvertExclusiveToSharedLite(RX_GET_MRX_FCB(F)->Header.Resource)
338 
339 VOID
341  _In_ PRX_CONTEXT RxContext);
342 
343 VOID
346  _In_ PIRP Irp);
347 
348 VOID
349 NTAPI
351  _In_ PRX_CONTEXT RxContext,
352  _In_ PIRP Irp);
353 
354 NTSTATUS
356  _In_ PRX_CONTEXT RxContext);
357 
358 #define QuadAlign(V) (ALIGN_UP(V, ULONGLONG))
359 
360 VOID
362  _In_ PRX_CONTEXT RxContext,
363  _In_ PIRP Irp,
365 
366 NTSTATUS
368  _In_ PRX_CONTEXT pContext,
370 
371 #if (_WIN32_WINNT >= 0x600)
372 NTSTATUS
374  _In_ PRX_CONTEXT RxContext,
375  _In_ PIRP Irp,
376  _In_ PSRV_CALL SrvCall,
377  _Out_ PLOCK_HOLDING_STATE LockHoldingState);
378 #else
379 NTSTATUS
381  _In_ PRX_CONTEXT RxContext,
382  _In_ PSRV_CALL SrvCall,
383  _Out_ PLOCK_HOLDING_STATE LockHoldingState);
384 #endif
385 
386 #define RxCompleteAsynchronousRequest(C, S) RxCompleteRequest(C, S)
387 
388 NTSTATUS
390  _In_ PRX_CONTEXT RxContext,
391  _In_ PSRV_CALL SrvCall,
392  _In_ PNET_ROOT NetRoot,
393  _In_ PV_NET_ROOT VirtualNetRoot,
394  _Out_ PLOCK_HOLDING_STATE LockHoldingState);
395 
396 #if (_WIN32_WINNT >= 0x0600)
397 NTSTATUS
399  _In_ PRX_CONTEXT RxContext,
400  _In_ PIRP Irp,
401  _In_ PUNICODE_STRING CanonicalName,
402  _In_ NET_ROOT_TYPE NetRootType,
403  _In_ BOOLEAN TreeConnect,
404  _Out_ PV_NET_ROOT *VirtualNetRootPointer,
405  _Out_ PLOCK_HOLDING_STATE LockHoldingState,
406  _Out_ PRX_CONNECTION_ID RxConnectionId);
407 
408 NTSTATUS
410  _In_ PRX_CONTEXT RxContext,
411  _In_ PIRP Irp,
412  _In_ PUNICODE_STRING CanonicalName,
413  _In_ NET_ROOT_TYPE NetRootType,
415 #else
416 NTSTATUS
418  _In_ PRX_CONTEXT RxContext,
419  _In_ PUNICODE_STRING CanonicalName,
420  _In_ NET_ROOT_TYPE NetRootType,
421  _Out_ PV_NET_ROOT *VirtualNetRootPointer,
422  _Out_ PLOCK_HOLDING_STATE LockHoldingState,
423  _Out_ PRX_CONNECTION_ID RxConnectionId);
424 
425 NTSTATUS
427  _In_ PRX_CONTEXT RxContext,
428  _In_ PUNICODE_STRING CanonicalName,
429  _In_ NET_ROOT_TYPE NetRootType,
431 #endif
432 
433 #if (_WIN32_WINNT >= 0x0600)
434 NTSTATUS
436  _In_ PRX_CONTEXT RxContext,
437  _In_ PIRP Irp,
438  _In_ PFCB Fcb);
439 #else
440 NTSTATUS
442  _In_ PRX_CONTEXT RxContext);
443 #endif
444 
445 NTSTATUS
446 NTAPI
448  PSRV_OPEN SrvOpen,
449  PVOID Context,
450  BOOLEAN ComputeNewState);
451 
452 VOID
453 NTAPI
455  PMRX_SRV_CALL SrvCall,
456  PMRX_SRV_OPEN SrvOpen,
457  PVOID SrvOpenKey,
458  PVOID Context);
459 
460 NTSTATUS
461 NTAPI
463  PRX_CONTEXT RxContext,
464  BOOLEAN SymbolicLinkEmbeddedInOldPath,
465  PUNICODE_STRING NewPath,
466  BOOLEAN NewPathIsAbsolute,
467  PBOOLEAN ReparseRequired);
468 
469 VOID
472 
473 VOID
476  _In_ LOCK_HOLDING_STATE LockHoldingState);
477 
478 VOID
481  _Inout_ PLIST_ENTRY TransitionWaitList,
482  _Inout_ PRX_CONTEXT RxContext,
483  _Out_opt_ NTSTATUS *AsyncStatus);
484 
485 VOID
487  _In_ RX_BLOCK_CONDITION NewConditionValue,
489  _In_ OUT PLIST_ENTRY TransitionWaitList);
490 
491 #if (_WIN32_WINNT >= 0x0600)
492 NTSTATUS
494  _In_opt_ PRX_CONTEXT RxContext,
495  _In_ PFOBX Fobx);
496 #else
497 NTSTATUS
499  _In_ PFOBX Fobx,
500  _In_opt_ PRX_CONTEXT RxContext);
501 #endif
502 
503 NTSTATUS
504 NTAPI
506  _Inout_ PNET_ROOT NetRoot,
507  _Inout_opt_ PV_NET_ROOT VNetRoot,
508  _In_ LOGICAL ForceFilesClosed);
509 
510 #if DBG
511 VOID
513  _In_ PSZ where1,
514  _In_ PSZ where2,
515  _In_ PSZ wherelogtag,
518 
519 VOID
521  _In_ PSZ where1,
522  _In_ PSZ where2,
523  _In_ PSZ wherelogtag,
525 #else
526 #define RxDumpWantedAccess(w1,w2,wlt,DA,DSA) {NOTHING;}
527 #define RxDumpCurrentAccess(w1,w2,wlt,SA) {NOTHING;}
528 #endif
529 
530 NTSTATUS
532  _In_ PFCB Fcb,
535 
536 VOID
538  _In_ PSRV_OPEN SrvOpen);
539 
540 VOID
542  _Inout_ PSRV_OPEN SrvOpen);
543 
544 #if DBG
545 NTSTATUS
552  _In_ PSZ where,
553  _In_ PSZ wherelogtag);
554 
555 VOID
559  _In_ PSZ where,
560  _In_ PSZ wherelogtag);
561 
562 VOID
568  _In_ PSZ where,
569  _In_ PSZ wherelogtag);
570 
571 VOID
575  _In_ PSZ where,
576  _In_ PSZ wherelogtag);
577 #else
578 #define RxCheckShareAccess(a1, a2, a3, a4, a5, a6, a7) IoCheckShareAccess(a1, a2, a3, a4, a5)
579 #define RxRemoveShareAccess(a1, a2, a3, a4) IoRemoveShareAccess(a1, a2)
580 #define RxSetShareAccess(a1, a2, a3, a4, a5, a6) IoSetShareAccess(a1, a2, a3, a4)
581 #define RxUpdateShareAccess(a1, a2, a3, a4) IoUpdateShareAccess(a1, a2)
582 #endif
583 
584 NTSTATUS
585 NTAPI
589 
590 VOID
591 NTAPI
592 RxUnload(
594 
595 VOID
598 
599 ULONG
602 
603 VOID
606 
607 VOID
609  _Inout_ PLIST_ENTRY DiscardedRequests);
610 
611 VOID
613  _Inout_ PSRV_CALL SrvCall,
614  _In_ PSRV_OPEN SrvOpen,
615  _Inout_ PLIST_ENTRY RequestsListHead);
616 
617 NTSTATUS
619  _In_ PSRV_CALL SrvCall,
621 
622 VOID
624  PSRV_OPEN SrvOpen);
625 
626 NTSTATUS
628  PFOBX FobxToBePurged);
629 
630 BOOLEAN
632  PFOBX pFobx);
633 
634 VOID
636  PVOID Instance);
637 
638 ULONG
641 
642 VOID
644  _In_ PUNICODE_STRING FilePathName,
645  _Out_ PUNICODE_STRING SrvCallName,
646  _Out_ PUNICODE_STRING RestOfName);
647 
648 VOID
649 NTAPI
651  _In_ PMRX_CREATENETROOT_CONTEXT CreateNetRootContext);
652 
653 PVOID
656  _In_opt_ PMINIRDR_DISPATCH MRxDispatch,
657  _In_ ULONG NameLength);
658 
659 VOID
661  _In_ PVOID pObject);
662 
663 NTSTATUS
665  _In_ PRX_CONTEXT RxContext,
666  _Inout_ PSRV_CALL SrvCall);
667 
668 VOID
670  _In_ PNET_ROOT NetRoot,
671  _In_ PV_NET_ROOT VNetRoot);
672 
673 VOID
675  _In_ PNET_ROOT NetRoot,
676  _In_ PV_NET_ROOT VNetRoot);
677 
678 PVOID
680  _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject,
683  _In_ ULONG NameSize,
684  _In_opt_ PVOID AlreadyAllocatedObject);
685 
686 VOID
688  _In_ PVOID Object);
689 
690 VOID
691 RxPurgeFcb(
692  _In_ PFCB Fcb);
693 
694 BOOLEAN
696  _Out_ PFCB ThisFcb,
697  _In_ BOOLEAN RecursiveFinalize,
698  _In_ BOOLEAN ForceFinalize,
699  _In_ LONG ReferenceCount);
700 
701 BOOLEAN
703  _In_ PRX_CONTEXT RxContext);
704 
705 VOID
706 NTAPI
708  VOID);
709 
710 NTSTATUS
712  _In_ PRX_WORK_QUEUE_DISPATCHER Dispatcher);
713 
714 VOID
717  _In_ WORK_QUEUE_TYPE WorkQueueType,
718  _In_ ULONG MaximumNumberOfWorkerThreads,
719  _In_ ULONG MinimumNumberOfWorkerThreads);
720 
721 NTSTATUS
726 
727 VOID
730 
731 VOID
732 NTAPI
734  _In_ PVOID Dispatcher);
735 
736 VOID
739  _In_ PLARGE_INTEGER WaitInterval);
740 
741 VOID
742 NTAPI
745 
748  _In_ PRX_PREFIX_TABLE ThisTable,
751  _In_opt_ PRX_CONNECTION_ID RxConnectionId);
752 
753 PVOID
755  _In_ PRX_PREFIX_TABLE ThisTable,
758  _In_opt_ PRX_CONNECTION_ID RxConnectionId);
759 
760 VOID
762  _In_ PV_NET_ROOT ThisVNetRoot);
763 
764 VOID
766  _In_ PFCB Fcb);
767 
768 VOID
770  _In_ PFCB Fcb,
771  _In_ PV_NET_ROOT ThisVNetRoot,
772  _In_ BOOLEAN OrphanAll);
773 
774 #define RxEqualConnectionId(C1, C2) RtlEqualMemory(C1, C2, sizeof(RX_CONNECTION_ID))
775 
776 NTSTATUS
777 NTAPI
780  _In_ PIRP Irp);
781 
782 VOID
783 NTAPI
786  _In_ PFILE_LOCK_INFO LockInfo);
787 
788 #if (_WIN32_WINNT >= 0x0600)
789 NTSTATUS
791  _In_ PRX_CONTEXT RxContext,
792  _In_ PFCB Fcb);
793 #else
794 NTSTATUS
796  _In_ PRX_CONTEXT RxContext);
797 #endif
798 
799 VOID
800 NTAPI
803  _In_ PIRP Irp);
804 
805 #ifdef __REACTOS__
806 #define RxWriteCacheingAllowed(F, S) ( \
807  BooleanFlagOn((F)->FcbState, FCB_STATE_WRITECACHING_ENABLED) && \
808  !BooleanFlagOn((S)->Flags, SRVOPEN_FLAG_DONTUSE_WRITE_CACHING))
809 #endif
810 
811 #endif
VOID RxInitializeMinirdrDispatchTable(_In_ PDRIVER_OBJECT DriverObject)
#define RxCheckShareAccess(a1, a2, a3, a4, a5, a6, a7)
Definition: rxprocs.h:578
VOID RxPurgeFcb(_In_ PFCB Fcb)
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
BOOLEAN RxFinalizeNetFcb(_Out_ PFCB ThisFcb, _In_ BOOLEAN RecursiveFinalize, _In_ BOOLEAN ForceFinalize, _In_ LONG ReferenceCount)
VOID RxCompleteRequest_Real(_In_ PRX_CONTEXT RxContext, _In_ PIRP Irp, _In_ NTSTATUS Status)
VOID RxVerifyOperationIsLegal(_In_ PRX_CONTEXT RxContext)
#define RxUpdateShareAccess(a1, a2, a3, a4)
Definition: rxprocs.h:581
NTSTATUS RxConstructSrvCall(_In_ PRX_CONTEXT RxContext, _In_ PSRV_CALL SrvCall, _Out_ PLOCK_HOLDING_STATE LockHoldingState)
Type
Definition: Type.h:6
NTSTATUS RxCheckShareAccessPerSrvOpens(_In_ PFCB Fcb, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess)
VOID RxRemoveVirtualNetRootFromNetRoot(_In_ PNET_ROOT NetRoot, _In_ PV_NET_ROOT VNetRoot)
_In_ ULONG Mode
Definition: hubbusif.h:303
VOID RxUpdateCondition(_In_ RX_BLOCK_CONDITION NewConditionValue, _Out_ PRX_BLOCK_CONDITION Condition, _In_ OUT PLIST_ENTRY TransitionWaitList)
VOID NTAPI RxReleaseFcbFromLazyWrite(_In_ PVOID Null)
_In_ PIRP Irp
Definition: csq.h:116
Definition: cdstruc.h:908
UCHAR NET_ROOT_TYPE
Definition: mrxfcb.h:36
VOID RxPrePostIrp(_In_ PVOID Context, _In_ PIRP Irp)
NTSTATUS NTAPI RxChangeBufferingState(PSRV_OPEN SrvOpen, PVOID Context, BOOLEAN ComputeNewState)
Definition: rxce.c:783
VOID __RxReleaseFcb(_Inout_opt_ PRX_CONTEXT RxContext, _Inout_ PMRX_FCB MrxFcb)
Definition: rxce.c:9142
PVOID RxNull
Definition: rxce.c:118
LONG NTSTATUS
Definition: precomp.h:26
_In_ BOOLEAN _In_ ULONG _Out_ PULONG HashValue
Definition: rtlfuncs.h:2039
NTSTATUS __RxAcquireFcb(_Inout_ PFCB Fcb, _Inout_opt_ PRX_CONTEXT RxContext, _In_ ULONG Mode)
Definition: rxce.c:8973
Definition: fcb.h:33
NTSTATUS NTAPI RxDriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath)
VOID NTAPI RxLogEventWithAnnotation(_In_ PRDBSS_DEVICE_OBJECT DeviceObject, _In_ ULONG EventId, _In_ NTSTATUS Status, _In_ PVOID DataBuffer, _In_ USHORT DataBufferLength, _In_ PUNICODE_STRING Annotation, _In_ ULONG AnnotationCount)
NTSTATUS NTAPI RxPrepareToReparseSymbolicLink(PRX_CONTEXT RxContext, BOOLEAN SymbolicLinkEmbeddedInOldPath, PUNICODE_STRING NewPath, BOOLEAN NewPathIsAbsolute, PBOOLEAN ReparseRequired)
Definition: rdbss.c:7825
VOID __RxWriteReleaseResources(PRX_CONTEXT RxContext, BOOLEAN ResourceOwnerSet, ULONG LineNumber, PCSTR FileName, ULONG SerialNumber)
Definition: rdbss.c:701
VOID RxOrphanThisFcb(_In_ PFCB Fcb)
NTSTATUS NTAPI RxFinalizeConnection(_Inout_ PNET_ROOT NetRoot, _Inout_opt_ PV_NET_ROOT VNetRoot, _In_ LOGICAL ForceFilesClosed)
BOOLEAN NTAPI RxAcquireFcbForLazyWrite(_In_ PVOID Null, _In_ BOOLEAN Wait)
uint16_t * PWCHAR
Definition: typedefs.h:55
Definition: fcb.h:304
WCHAR DeviceName[]
Definition: adapter.cpp:21
_In_ PVOID Parameter
Definition: ldrtypes.h:241
NTSTATUS RxLowIoLockControlShell(_In_ PRX_CONTEXT RxContext)
VOID RxPrepareRequestForReuse(PCHANGE_BUFFERING_STATE_REQUEST Request)
Definition: rxce.c:6607
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK _In_ USHORT ShareAccess
Definition: create.c:4157
#define _In_opt_
Definition: no_sal2.h:213
VOID(NTAPI * PRX_WORKERTHREAD_ROUTINE)(_In_ PVOID Context)
Definition: rxworkq.h:6
_In_ NDIS_HANDLE _In_ PNDIS_REQUEST Request
Definition: ndis.h:5173
NTSTATUS RxPostStackOverflowRead(_In_ PRX_CONTEXT RxContext)
VOID RxReference(_Inout_ PVOID Instance)
VOID RxConjureOriginalName(_Inout_ PFCB Fcb, _Inout_ PFOBX Fobx, _Out_ PULONG ActualNameLength, _Out_writes_bytes_(*LengthRemaining) PWCHAR OriginalName, _Inout_ PLONG LengthRemaining, _In_ RX_NAME_CONJURING_METHODS NameConjuringMethod)
#define RxTrackerUpdateHistory(R, F, O, L, F, S)
Definition: rxprocs.h:218
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN RxPurgeFobx(PFOBX pFobx)
Definition: rxce.c:7051
long LONG
Definition: pedump.c:60
_In_ ULONG BufferLength
Definition: usbdlib.h:225
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock IN PNDIS_RW_LOCK IN PLOCK_STATE LockState
Definition: CrNtStubs.h:99
LIST_ENTRY WorkQueue
Definition: workqueue.c:20
#define RxDumpWantedAccess(w1, w2, wlt, DA, DSA)
Definition: rxprocs.h:526
unsigned char BOOLEAN
NTSTATUS RxSpinUpWorkerThread(_In_ PRX_WORK_QUEUE WorkQueue, _In_ PRX_WORKERTHREAD_ROUTINE Routine, _In_ PVOID Parameter)
VOID NTAPI RxCheckFcbStructuresForAlignment(VOID)
Definition: rdbss.c:1447
PVOID RxAllocateObject(_In_ NODE_TYPE_CODE NodeType, _In_opt_ PMINIRDR_DISPATCH MRxDispatch, _In_ ULONG NameLength)
VOID RxFreeFcbObject(_In_ PVOID Object)
VOID NTAPI RxNoOpRelease(_In_ PVOID Fcb)
#define _Out_writes_bytes_(size)
Definition: no_sal2.h:370
#define _Out_
Definition: no_sal2.h:323
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
VOID RxGatherRequestsForSrvOpen(_Inout_ PSRV_CALL SrvCall, _In_ PSRV_OPEN SrvOpen, _Inout_ PLIST_ENTRY RequestsListHead)
NTSTATUS RxpLookupSrvOpenForRequestLite(_In_ PSRV_CALL SrvCall, _Inout_ PCHANGE_BUFFERING_STATE_REQUEST Request)
IN ULONG IN UCHAR Condition
enum _RX_BLOCK_CONDITION * PRX_BLOCK_CONDITION
NodeType
Definition: Node.h:5
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
PVOID RxMapSystemBuffer(_In_ PRX_CONTEXT RxContext)
ULONG RxGetSessionId(_In_ PIO_STACK_LOCATION IrpSp)
NTSTATUS RxInitializeWorkQueueDispatcher(_In_ PRX_WORK_QUEUE_DISPATCHER Dispatcher)
VOID NTAPI RxAddToWorkque(_In_ PRX_CONTEXT RxContext, _In_ PIRP Irp)
PVOID RxTableLookupName(_In_ PRX_PREFIX_TABLE ThisTable, _In_ PUNICODE_STRING Name, _Out_ PUNICODE_STRING RemainingName, _In_opt_ PRX_CONNECTION_ID RxConnectionId)
#define _Out_opt_
Definition: no_sal2.h:339
VOID NTAPI RxIndicateChangeOfBufferingStateForSrvOpen(PMRX_SRV_CALL SrvCall, PMRX_SRV_OPEN SrvOpen, PVOID SrvOpenKey, PVOID Context)
Definition: rdbss.c:6880
NTSTATUS RxCloseAssociatedSrvOpen(_In_ PFOBX Fobx, _In_opt_ PRX_CONTEXT RxContext)
Definition: fcb.h:9
_RX_NAME_CONJURING_METHODS
Definition: rxprocs.h:78
VOID RxProcessChangeBufferingStateRequestsForSrvOpen(PSRV_OPEN SrvOpen)
Definition: rxce.c:6655
INT POOL_TYPE
Definition: typedefs.h:77
VOID RxInitializeWorkQueue(_In_ PRX_WORK_QUEUE WorkQueue, _In_ WORK_QUEUE_TYPE WorkQueueType, _In_ ULONG MaximumNumberOfWorkerThreads, _In_ ULONG MinimumNumberOfWorkerThreads)
NTSTATUS RxPurgeFobxFromCache(PFOBX FobxToBePurged)
Definition: rxce.c:7087
NTSTATUS NTAPI RxCompleteMdl(_In_ PRX_CONTEXT RxContext)
PRX_PREFIX_ENTRY RxTableLookupName_ExactLengthMatch(_In_ PRX_PREFIX_TABLE ThisTable, _In_ PUNICODE_STRING Name, _In_ ULONG HashValue, _In_opt_ PRX_CONNECTION_ID RxConnectionId)
NTSTATUS NTAPI RxLockOperationCompletion(_In_ PVOID Context, _In_ PIRP Irp)
VOID RxDereference(_Inout_ PVOID Instance, _In_ LOCK_HOLDING_STATE LockHoldingState)
VOID NTAPI RxLogEventDirect(_In_ PRDBSS_DEVICE_OBJECT DeviceObject, _In_ PUNICODE_STRING OriginatorId, _In_ ULONG EventId, _In_ NTSTATUS Status, _In_ ULONG Line)
NTSTATUS RxFindOrConstructVirtualNetRoot(_In_ PRX_CONTEXT RxContext, _In_ PUNICODE_STRING CanonicalName, _In_ NET_ROOT_TYPE NetRootType, _In_ PUNICODE_STRING RemainingName)
VOID NTAPI RxBootstrapWorkerThreadDispatcher(_In_ PVOID WorkQueue)
VOID RxRemoveShareAccessPerSrvOpens(_Inout_ PSRV_OPEN SrvOpen)
NTSTATUS RxInitializeSrvCallParameters(_In_ PRX_CONTEXT RxContext, _Inout_ PSRV_CALL SrvCall)
BOOLEAN NTAPI RxAcquireFcbForReadAhead(_In_ PVOID Null, _In_ BOOLEAN Wait)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_opt_ GUID _In_ USHORT DataBufferLength
Definition: fltkernel.h:1270
#define _Inout_
Definition: no_sal2.h:244
VOID NTAPI RxCancelRoutine(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
char * PSZ
Definition: windef.h:57
* PFILE_OBJECT
Definition: iotypes.h:1955
NTSTATUS RxFsdPostRequest(_In_ PRX_CONTEXT RxContext)
_In_ ULONG DesiredShareAccess
Definition: iofuncs.h:779
static IUnknown Object
Definition: main.c:512
VOID RxpWorkerThreadDispatcher(_In_ PRX_WORK_QUEUE WorkQueue, _In_ PLARGE_INTEGER WaitInterval)
_In_ ERESOURCE_THREAD ResourceThreadId
Definition: exfuncs.h:844
NTSTATUS RxPrefixClaim(_In_ PRX_CONTEXT RxContext)
Definition: ncftp.h:79
ULONG RxGetNetworkProviderPriority(_In_ PUNICODE_STRING DeviceName)
enum _WORK_QUEUE_TYPE WORK_QUEUE_TYPE
char * PBOOLEAN
Definition: retypes.h:11
VOID RxFreeObject(_In_ PVOID pObject)
enum _LOCK_HOLDING_STATE * PLOCK_HOLDING_STATE
enum _LOCK_HOLDING_STATE LOCK_HOLDING_STATE
ULONG SerialNumber
Definition: rxce.c:117
Definition: typedefs.h:118
Definition: fcb.h:260
BOOLEAN RxIsThisACscAgentOpen(_In_ PRX_CONTEXT RxContext)
NTSTATUS RxFindOrCreateConnections(_In_ PRX_CONTEXT RxContext, _In_ PUNICODE_STRING CanonicalName, _In_ NET_ROOT_TYPE NetRootType, _Out_ PUNICODE_STRING LocalNetRootName, _Out_ PUNICODE_STRING FilePathName, _Inout_ PLOCK_HOLDING_STATE LockState, _In_ PRX_CONNECTION_ID RxConnectionId)
Definition: rxce.c:3675
NTSTATUS RxCompleteRequest(_In_ PRX_CONTEXT pContext, _In_ NTSTATUS Status)
VOID RxOrphanSrvOpensForThisFcb(_In_ PFCB Fcb, _In_ PV_NET_ROOT ThisVNetRoot, _In_ BOOLEAN OrphanAll)
VOID __RxReleaseFcbForThread(_Inout_opt_ PRX_CONTEXT RxContext, _Inout_ PMRX_FCB MrxFcb, _In_ ERESOURCE_THREAD ResourceThreadId)
Definition: rxce.c:9188
Status
Definition: gdiplustypes.h:24
VOID NTAPI RxUnlockOperation(_In_ PVOID Context, _In_ PFILE_LOCK_INFO LockInfo)
VOID RxSpinUpWorkerThreads(_In_ PRX_WORK_QUEUE WorkQueue)
ULONG RxTableComputePathHashValue(_In_ PUNICODE_STRING Name)
#define _In_
Definition: no_sal2.h:204
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1216
VOID RxWaitForStableCondition(_In_ PRX_BLOCK_CONDITION Condition, _Inout_ PLIST_ENTRY TransitionWaitList, _Inout_ PRX_CONTEXT RxContext, _Out_opt_ NTSTATUS *AsyncStatus)
LUID RxGetUid(_In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext)
enum _LOCK_OPERATION LOCK_OPERATION
VOID RxUndoScavengerFinalizationMarking(PVOID Instance)
Definition: rxce.c:8667
VOID RxAddVirtualNetRootToNetRoot(_In_ PNET_ROOT NetRoot, _In_ PV_NET_ROOT VNetRoot)
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS RxConstructNetRoot(_In_ PRX_CONTEXT RxContext, _In_ PSRV_CALL SrvCall, _In_ PNET_ROOT NetRoot, _In_ PV_NET_ROOT VirtualNetRoot, _Out_ PLOCK_HOLDING_STATE LockHoldingState)
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4157
VOID RxLockUserBuffer(_In_ PRX_CONTEXT RxContext, _In_ LOCK_OPERATION Operation, _In_ ULONG BufferLength)
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
unsigned int * PULONG
Definition: retypes.h:1
IN PVOID Instance
Definition: pci.h:359
#define RxSetShareAccess(a1, a2, a3, a4, a5, a6)
Definition: rxprocs.h:580
enum _RX_NAME_CONJURING_METHODS RX_NAME_CONJURING_METHODS
VOID RxOrphanSrvOpens(_In_ PV_NET_ROOT ThisVNetRoot)
VOID RxpDiscardChangeBufferingStateRequests(_Inout_ PLIST_ENTRY DiscardedRequests)
Definition: rxce.c:6065
#define RxRemoveShareAccess(a1, a2, a3, a4)
Definition: rxprocs.h:579
#define OUT
Definition: typedefs.h:40
NTSTATUS RxLowIoCompletionTail(_In_ PRX_CONTEXT RxContext)
VOID NTAPI RxReleaseFcbFromReadAhead(_In_ PVOID Null)
enum _RX_BLOCK_CONDITION RX_BLOCK_CONDITION
VOID RxTrackPagingIoResource(_Inout_ PVOID Instance, _In_ ULONG Type, _In_ ULONG Line, _In_ PCSTR File)
Definition: rxce.c:8654
unsigned int ULONG
Definition: retypes.h:1
_In_ FLT_SET_CONTEXT_OPERATION Operation
Definition: fltkernel.h:1468
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:28
const char * PCSTR
Definition: typedefs.h:52
VOID NTAPI RxUnload(_In_ PDRIVER_OBJECT DriverObject)
BOOLEAN NTAPI RxNoOpAcquire(_In_ PVOID Fcb, _In_ BOOLEAN Wait)
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
Definition: File.h:15
VOID RxExtractServerName(_In_ PUNICODE_STRING FilePathName, _Out_ PUNICODE_STRING SrvCallName, _Out_ PUNICODE_STRING RestOfName)
_In_ PFCB Fcb
Definition: cdprocs.h:151
NTSTATUS RxConstructVirtualNetRoot(_In_ PRX_CONTEXT RxContext, _In_ PUNICODE_STRING CanonicalName, _In_ NET_ROOT_TYPE NetRootType, _Out_ PV_NET_ROOT *VirtualNetRootPointer, _Out_ PLOCK_HOLDING_STATE LockHoldingState, _Out_ PRX_CONNECTION_ID RxConnectionId)
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
signed int * PLONG
Definition: retypes.h:5
VOID RxpPrepareCreateContextForReuse(_In_ PRX_CONTEXT RxContext)
VOID NTAPI RxSpinUpRequestsDispatcher(_In_ PVOID Dispatcher)
Definition: prefix.h:44
VOID RxUpdateShareAccessPerSrvOpens(_In_ PSRV_OPEN SrvOpen)
ULONG ACCESS_MASK
Definition: nt_native.h:40
PVOID RxAllocateFcbObject(_In_ PRDBSS_DEVICE_OBJECT RxDeviceObject, _In_ NODE_TYPE_CODE NodeType, _In_ POOL_TYPE PoolType, _In_ ULONG NameSize, _In_opt_ PVOID AlreadyAllocatedObject)
#define RxDumpCurrentAccess(w1, w2, wlt, SA)
Definition: rxprocs.h:527
VOID NTAPI RxCreateNetRootCallBack(_In_ PMRX_CREATENETROOT_CONTEXT CreateNetRootContext)
#define _Inout_opt_
Definition: no_sal2.h:258
IN BOOLEAN Wait
Definition: fatprocs.h:1529
_Inout_ PFCB _Inout_ PUNICODE_STRING RemainingName
Definition: cdprocs.h:806
_In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext
Definition: sefuncs.h:13