ReactOS 0.4.16-dev-297-gc569aee
fxirpkm.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxIrpKm.hpp
8
9Abstract:
10
11 This module implements km definitions for FxIrp functions.
12
13Author:
14
15
16
17Environment:
18
19 Kernel mode only
20
21Revision History:
22
23--*/
24
25//
26// All the functions in this file should use __inline so that KMDF gets
27// inlining. FxIrp.hpp does not use __inline on the functions because it
28// doesn't work for UMDF (see comments in FxIrp.hpp).
29//
30
31#ifndef _FXIRPKM_HPP_
32#define _FXIRPKM_HPP_
33
34typedef PIRP MdIrp;
35
36typedef DRIVER_CANCEL MdCancelRoutineType, *MdCancelRoutine;
37typedef IO_COMPLETION_ROUTINE MdCompletionRoutineType, *MdCompletionRoutine;
38typedef REQUEST_POWER_COMPLETE MdRequestPowerCompleteType, *MdRequestPowerComplete;
39
40typedef
44 __in FxIrp *Irp,
46 );
47
48typedef
52 __in FxIrp *Irp,
53 __in PVOID CancelContext
54 );
55
56#include "fxirp.hpp"
57
58
59
60__inline
63 VOID
64 )
65{
66 return m_Irp;
67}
68
69__inline
73 )
74{
75 MdIrp old = m_Irp;
76 m_Irp = irp;
77 return old;
78}
79
80__inline
81VOID
84 )
85{
87 m_Irp = NULL;
88}
89
90__inline
94 )
95{
97}
98
99__inline
103 )
104{
105 return ::PoCallDriver(DeviceObject, m_Irp);
106}
107
108__inline
109VOID
111 )
112{
114}
115
116__inline
119 VOID
120 )
121{
123}
124
125
126__inline
127VOID
134 )
135{
137 m_Irp,
139 Context,
143 );
144}
145
146__inline
147VOID
155 )
156{
159 m_Irp,
161 Context,
164 InvokeOnCancel))) {
165
167 m_Irp,
169 Context,
173 );
174 }
175}
176
177__inline
181 )
182{
184}
185
186__inline
193 )
194{
195 FxCREvent* event = (FxCREvent*) Context;
196
198
199 if (OriginalIrp->PendingReturned) {
200 //
201 // No need to propagate the pending returned bit since we are handling
202 // the request synchronously
203 //
204 event->Set();
205 }
206
208}
209
210__inline
214 )
215{
218
220 event.GetSelfPointer(),
221 TRUE,
222 TRUE,
223 TRUE);
224
226
227 if (status == STATUS_PENDING) {
228 event.EnterCRAndWaitAndLeave();
229 status = m_Irp->IoStatus.Status;
230 }
231
232 return status;
233}
234
235__inline
236VOID
239 )
240{
242
243 RtlCopyMemory(nextIrpSp,
244 Stack,
246 );
247 nextIrpSp->Control = 0;
248}
249
250
251__inline
252VOID
254 VOID
255 )
256{
258}
259
260__inline
261VOID
263 VOID
264 )
265{
267}
268
269__inline
270UCHAR
272 VOID
273 )
274{
276}
277
278__inline
279UCHAR
281 VOID
282 )
283{
285}
286
287__inline
288UCHAR
290 VOID
291 )
292{
294}
295
296__inline
299 VOID
300 )
301{
303}
304
305__inline
308 VOID
309 )
310{
311 return m_Irp->RequestorMode;
312}
313
314__inline
315VOID
319 )
320{
321 m_Irp->Tail.Overlay.DriverContext[Index] = Value;
322}
323
324__inline
325PVOID
328 )
329{
330 return m_Irp->Tail.Overlay.DriverContext[Index];
331}
332
333__inline
334VOID
337 )
338{
339 m_Irp->Flags = Flags;
340}
341
342__inline
343ULONG
345 VOID
346 )
347{
348 return m_Irp->Flags;
349}
350
351__inline
354 VOID
355 )
356{
358}
359
360__inline
363 VOID
364 )
365{
367}
368
370__inline
373 )
374{
378}
379
380__inline
381VOID
383 VOID
384 )
385{
386
387
388
389
390
391
393}
394
395__inline
396VOID
398 )
399{
401}
402
403__inline
406 )
407{
408 return m_Irp->PendingReturned;
409}
410
411__inline
412VOID
414 VOID
415 )
416{
417 if (PendingReturned() && m_Irp->CurrentLocation <= m_Irp->StackCount) {
419 }
420}
421
422__inline
423VOID
426 )
427{
428 m_Irp->IoStatus.Status = Status;
429}
430
431__inline
434 )
435{
436 return m_Irp->IoStatus.Status;
437}
438
439__inline
442 VOID
443 )
444{
445 return IoCancelIrp(m_Irp);
446}
447
448__inline
449VOID
452 )
453{
454 m_Irp->Cancel = Cancel;
455}
456
457__inline
460 )
461{
462 return m_Irp->Cancel ? TRUE : FALSE;
463}
464
465__inline
466KIRQL
468 )
469{
470 return m_Irp->CancelIrql;
471}
472
473__inline
474VOID
477 )
478{
479 m_Irp->IoStatus.Information = Information;
480}
481
482__inline
485 )
486{
487 return m_Irp->IoStatus.Information;
488}
489
490__inline
491CCHAR
493 )
494{
495 return m_Irp->CurrentLocation;
496}
497
498__inline
499CCHAR
501 )
502{
503 return m_Irp->StackCount;
504}
505
506__inline
509 )
510{
511 return &m_Irp->Tail.Overlay.ListEntry;
512}
513
514__inline
515PVOID
517 )
518{
519 return m_Irp->AssociatedIrp.SystemBuffer;
520}
521
522__inline
523PVOID
525 )
526{
527 //
528 // In kernel mode, for buffered I/O, the output and input buffers are
529 // at same location.
530 //
531 return GetSystemBuffer();
532}
533
534__inline
535VOID
538 )
539{
540 m_Irp->AssociatedIrp.SystemBuffer = Value;
541}
542
543
544__inline
545PMDL
547 )
548{
549 return m_Irp->MdlAddress;
550}
551
552__inline
553PMDL*
555 )
556{
557 return &m_Irp->MdlAddress;
558}
559
560__inline
561VOID
564 )
565{
566 m_Irp->MdlAddress = Value;
567}
568
569
570__inline
571PVOID
573 )
574{
575 return m_Irp->UserBuffer;
576}
577
578
579__inline
580VOID
583 )
584{
585 m_Irp->UserBuffer = Value;
586}
587
588__inline
589VOID
592 )
593{
595}
596
597__inline
598VOID
601 )
602{
604}
605
606__inline
607VOID
610 )
611{
613}
614
615__inline
618 )
619{
620 return (this->GetCurrentIrpStackLocation())->
621 Parameters.Power.SystemPowerStateContext;
622}
623
624__inline
627 )
628{
629 return (this->GetCurrentIrpStackLocation())->Parameters.Power.Type;
630}
631
632__inline
635 )
636{
637 return (this->GetCurrentIrpStackLocation())->Parameters.Power.State;
638}
639
640__inline
643 )
644{
645 return (this->GetCurrentIrpStackLocation())->
646 Parameters.Power.State.DeviceState;
647}
648
649__inline
652 )
653{
654 return (this->GetCurrentIrpStackLocation())->
655 Parameters.Power.State.SystemState;
656}
657
658__inline
661 )
662{
663 return (this->GetCurrentIrpStackLocation())->
664 Parameters.Power.ShutdownType;
665}
666
667__inline
670 )
671{
672 return (this->GetCurrentIrpStackLocation())->
673 Parameters.QueryDeviceRelations.Type;
674}
675
676__inline
677VOID
679 DEVICE_RELATION_TYPE DeviceRelation
680 )
681{
683 Parameters.QueryDeviceRelations.Type = DeviceRelation;
684}
685
686__inline
689 )
690{
691 return this->GetCurrentIrpStackLocation()->
692 Parameters.DeviceCapabilities.Capabilities;
693}
694
695__inline
698 VOID
699 )
700{
702}
703
704__inline
705VOID
708 )
709{
711}
712
713__inline
714VOID
717 )
718{
721}
722
723__inline
726 )
727{
728 return this->GetCurrentIrpStackLocation()->
729 Parameters.Write.ByteOffset.QuadPart;
730}
731
732__inline
733VOID
736 )
737{
739 Parameters.Write.ByteOffset.QuadPart = DeviceOffset;
740}
741
742__inline
743VOID
745 __in ULONG IoLength
746 )
747{
749 Parameters.Write.Length = IoLength;
750}
751
752__inline
753PVOID*
755 )
756{
757 PIO_STACK_LOCATION nextStack;
758
759 nextStack = this->GetNextIrpStackLocation();
760
761 return &nextStack->Parameters.Others.Argument1;
762}
763
764__inline
765VOID
768 )
769{
771 Parameters.Others.Argument1 = Argument1;
772}
773
774__inline
775PVOID*
777 )
778{
779 PIO_STACK_LOCATION nextStack;
780
781 nextStack = this->GetNextIrpStackLocation();
782
783 return &nextStack->Parameters.Others.Argument2;
784}
785
786__inline
787PVOID*
789 )
790{
791 PIO_STACK_LOCATION nextStack;
792
793 nextStack = this->GetNextIrpStackLocation();
794
795 return &nextStack->Parameters.Others.Argument4;
796}
797
798__inline
801 )
802{
803 return this->GetCurrentIrpStackLocation()->
804 Parameters.StartDevice.AllocatedResources;
805}
806
807__inline
808VOID
811 )
812{
814 Parameters.StartDevice.AllocatedResources = AllocatedResources;
815}
816
817__inline
820 )
821{
822 return this->GetCurrentIrpStackLocation()->
823 Parameters.StartDevice.AllocatedResourcesTranslated;
824}
825
826__inline
827VOID
830 )
831{
833 Parameters.StartDevice.AllocatedResourcesTranslated =
835}
836
837__inline
838LCID
840 )
841{
842 return this->GetCurrentIrpStackLocation()->
844}
845
846__inline
849 )
850{
851 return this->GetCurrentIrpStackLocation()->
852 Parameters.QueryDeviceText.DeviceTextType;
853}
854
855__inline
858 )
859{
860 return this->GetCurrentIrpStackLocation()->Parameters.SetLock.Lock;
861}
862
863__inline
866 )
867{
868 return this->GetCurrentIrpStackLocation()->Parameters.QueryId.IdType;
869}
870
871__inline
874 )
875{
876 return this->GetCurrentIrpStackLocation()->
877 Parameters.QueryInterface.Interface;
878}
879
880__inline
881const GUID*
883 )
884{
885 return this->GetCurrentIrpStackLocation()->
886 Parameters.QueryInterface.InterfaceType;
887}
888
889__inline
892 VOID
893 )
894{
896}
897
898__inline
899USHORT
901 )
902{
904}
905
906__inline
907USHORT
909 )
910{
912}
913
914__inline
915PVOID
917 )
918{
919 return this->GetCurrentIrpStackLocation()->
920 Parameters.QueryInterface.InterfaceSpecificData;
921}
922
923__inline
926 )
927{
928 return this->GetCurrentIrpStackLocation()->
930}
931
932__inline
935 )
936{
937 return this->GetCurrentIrpStackLocation()->
939}
940
941__inline
942VOID
944 __in BOOLEAN InPath
945 )
946{
948 Parameters.UsageNotification.InPath = InPath;
949}
950
951__inline
954 )
955{
956 return this->GetNextIrpStackLocation()->
958}
959
960
961
962__inline
963ULONG
965 VOID
966 )
967{
968 return this->GetCurrentIrpStackLocation()->
969 Parameters.DeviceIoControl.IoControlCode;
970}
971
972__inline
973ULONG
975 VOID
976 )
977{
979}
980
981__inline
982ULONG
984 VOID
985 )
986{
987 return this->GetCurrentIrpStackLocation()->
988 Parameters.DeviceIoControl.OutputBufferLength;
989}
990
991__inline
992ULONG
994 VOID
995 )
996{
997 return this->GetCurrentIrpStackLocation()->
998 Parameters.DeviceIoControl.InputBufferLength;
999}
1000
1001__inline
1002VOID
1004 __in ULONG DeviceIoControlCode
1005 )
1006{
1007 this->GetNextIrpStackLocation()->
1008 Parameters.DeviceIoControl.IoControlCode = DeviceIoControlCode;
1009}
1010
1011__inline
1012VOID
1015 )
1016{
1017 this->GetNextIrpStackLocation()->
1018 Parameters.DeviceIoControl.InputBufferLength = InputBufferLength;
1019}
1020
1021__inline
1022VOID
1025 )
1026{
1027 this->GetNextIrpStackLocation()->
1028 Parameters.DeviceIoControl.OutputBufferLength = OutputBufferLength;
1029}
1030
1031__inline
1032VOID
1034 __in PVOID Type3InputBuffer
1035 )
1036{
1037 this->GetNextIrpStackLocation()->
1038 Parameters.DeviceIoControl.Type3InputBuffer = Type3InputBuffer;
1039}
1040
1041__inline
1042PVOID
1044 VOID
1045 )
1046{
1047 return this->GetCurrentIrpStackLocation()->
1048 Parameters.DeviceIoControl.Type3InputBuffer;
1049}
1050
1051__inline
1052VOID
1055 )
1056{
1057 this->GetNextIrpStackLocation()->
1059}
1060
1061__inline
1062VOID
1064 __in const GUID* InterfaceType
1065 )
1066{
1067 this->GetNextIrpStackLocation()->
1068 Parameters.QueryInterface.InterfaceType = InterfaceType;
1069}
1070
1071__inline
1072VOID
1075 )
1076{
1078}
1079
1080__inline
1081VOID
1084 )
1085{
1087}
1088
1089__inline
1090VOID
1093 )
1094{
1095 this->GetNextIrpStackLocation()->
1096 Parameters.QueryInterface.InterfaceSpecificData = InterfaceSpecificData;
1097}
1098
1099__inline
1100VOID
1103 )
1104{
1106}
1107
1108__inline
1109VOID
1112 )
1113{
1115}
1116
1117
1118__inline
1119VOID
1121 VOID
1122 )
1123{
1125
1127 RtlZeroMemory(stack, sizeof(IO_STACK_LOCATION));
1128}
1129
1130
1131
1132
1133__inline
1134VOID
1136 VOID
1137 )
1138{
1141}
1142
1143__inline
1144VOID
1146 __in FxIrp* Irp
1147 )
1148{
1149 PIO_STACK_LOCATION srcStack, destStack;
1150
1151 srcStack = Irp->GetCurrentIrpStackLocation();
1152 destStack = this->GetNextIrpStackLocation();
1153
1154 *destStack = *srcStack;
1155}
1156
1158__inline
1159MdIrp
1163 )
1164{
1166
1167 return IoAllocateIrp(StackSize, FALSE);
1168}
1169
1170__inline
1171MdIrp
1173 __in PLIST_ENTRY Ple
1174 )
1175{
1176 return CONTAINING_RECORD(Ple, IRP, Tail.Overlay.ListEntry);
1177}
1178
1179__inline
1180ULONG
1182 VOID
1183 )
1184{
1185 return this->GetCurrentIrpStackLocation()->Parameters.Read.Length;
1186}
1187
1188__inline
1189ULONG
1191 VOID
1192 )
1193{
1194 return this->GetCurrentIrpStackLocation()->Parameters.Write.Length;
1195}
1196
1198__inline
1206 )
1207{
1208 //
1209 // Prefast enforces that NULL is passed for IRP parameter (last parameter)
1210 // since the IRP might complete before the function returns.
1211 //
1212 return PoRequestPowerIrp(
1215 PowerState,
1217 Context,
1218 NULL);
1219}
1220
1221__inline
1222ULONG
1224 VOID
1225 )
1226{
1227 return (this->GetCurrentIrpStackLocation())->Flags;
1228}
1229
1230__inline
1231PVOID
1233 VOID
1234 )
1235{
1236 return &(this->GetCurrentIrpStackLocation())->Parameters;
1237}
1238
1239__inline
1242 VOID
1243 )
1244{
1245 return m_Irp->Tail.Overlay.Thread;
1246}
1247
1248__inline
1249BOOLEAN
1251 VOID
1252 )
1253{
1254
1255#if defined(_WIN64)
1256
1257#if BUILD_WOW64_ENABLED
1258
1259 return IoIs32bitProcess(m_Irp);
1260
1261#else // BUILD_WOW64_ENABLED
1262
1263 return FALSE;
1264
1265#endif // BUILD_WOW64_ENABLED
1266
1267#else // defined(_WIN64)
1268
1269 return TRUE;
1270
1271#endif // defined(_WIN64)
1272
1273}
1274
1275__inline
1276VOID
1278 VOID
1279 )
1280{
1282}
1283
1284__inline
1287 VOID
1288 )
1289{
1290 return &m_Irp->IoStatus;
1291}
1292
1293__inline
1294PVOID
1296 VOID
1297 )
1298{
1299 return m_Irp->Tail.Overlay.DriverContext;
1300}
1301
1302__inline
1303ULONG
1305 VOID
1306 )
1307{
1308 return sizeof(m_Irp->Tail.Overlay.DriverContext);
1309}
1310
1311__inline
1312VOID
1315 )
1316{
1317 RtlMoveMemory(&Parameters->Parameters,
1319 sizeof(Parameters->Parameters));
1320}
1321
1322__inline
1323VOID
1325 _Out_ PIO_STATUS_BLOCK StatusBlock
1326 )
1327{
1328 RtlCopyMemory(StatusBlock,
1330 sizeof(*StatusBlock));
1331}
1332
1333__inline
1334BOOLEAN
1336 _In_ UCHAR StackCount
1337 )
1338{
1339 return (GetCurrentIrpStackLocationIndex() >= StackCount);
1340}
1341
1342__inline
1343BOOLEAN
1345 VOID
1346 )
1347{
1349}
1350
1351__inline
1353{
1354 if (m_Irp != NULL) {
1356 }
1357}
1358
1359#endif // _FXIRPKM_HPP
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned char BOOLEAN
static ULONG StackSize
Definition: StackOverflow.c:19
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
Definition: fxirp.hpp:28
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
ULONG GetParameterWriteLength(VOID)
Definition: fxirpum.cpp:1601
MdEThread GetThread(VOID)
Definition: fxirpum.cpp:1631
POWER_ACTION GetParameterPowerShutdownType()
Definition: fxirpum.cpp:719
PDEVICE_CAPABILITIES GetParameterDeviceCapabilities()
Definition: fxirpum.cpp:1132
DEVICE_RELATION_TYPE GetParameterQDRType()
Definition: fxirpum.cpp:731
SYSTEM_POWER_STATE_CONTEXT GetParameterPowerSystemPowerStateContext()
Definition: fxirpum.cpp:671
VOID CompleteRequest(__in_opt CCHAR PriorityBoost=IO_NO_INCREMENT)
Definition: fxirpum.cpp:24
MdDeviceObject GetDeviceObject(VOID)
Definition: fxirpum.cpp:1352
VOID InitNextStackUsingStack(__in FxIrp *Irp)
Definition: fxirpum.cpp:1035
VOID SetParameterUsageNotificationInPath(__in BOOLEAN InPath)
Definition: fxirpum.cpp:821
MdCancelRoutine SetCancelRoutine(__in_opt MdCancelRoutine CancelRoutine)
Definition: fxirpum.cpp:124
MdIrp m_Irp
Definition: fxirp.hpp:33
VOID SetParameterQueryInterfaceSize(__in USHORT Size)
Definition: fxirpkm.hpp:1082
PCM_RESOURCE_LIST GetParameterAllocatedResources()
Definition: fxirpum.cpp:843
LCID GetParameterQueryDeviceTextLocaleId()
Definition: fxirpum.cpp:975
UCHAR GetCurrentStackFlags(VOID)
Definition: fxirpum.cpp:1243
DEVICE_TEXT_TYPE GetParameterQueryDeviceTextType()
Definition: fxirpum.cpp:984
BOOLEAN GetParameterUsageNotificationInPath()
Definition: fxirpum.cpp:811
PVOID * GetNextStackParameterOthersArgument2Pointer()
Definition: fxirpum.cpp:1434
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:151
ULONG GetParameterIoctlCodeBufferMethod(VOID)
Definition: fxirpum.cpp:1490
VOID SetMinorFunction(__in UCHAR MinorFunction)
Definition: fxirpum.cpp:967
PVOID * GetNextStackParameterOthersArgument4Pointer()
Definition: fxirpum.cpp:1447
PMDL * GetMdlAddressPointer()
Definition: fxirpum.cpp:1323
ULONG GetParameterIoctlCode(VOID)
Definition: fxirpum.cpp:1474
VOID SetSystemBuffer(__in PVOID Value)
Definition: fxirpum.cpp:1313
static _Must_inspect_result_ MdIrp AllocateIrp(_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
Definition: fxirpum.cpp:1089
VOID ClearNextStack(VOID)
Definition: fxirpum.cpp:1183
VOID SetCompletionRoutineEx(__in MdDeviceObject DeviceObject, __in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
Definition: fxirpum.cpp:104
KPROCESSOR_MODE GetRequestorMode(VOID)
Definition: fxirpum.cpp:329
BOOLEAN PendingReturned()
Definition: fxirpum.cpp:429
BOOLEAN Cancel(VOID)
Definition: fxirpum.cpp:475
VOID SetParameterQueryInterfaceType(__in const GUID *InterfaceType)
Definition: fxirpkm.hpp:1063
CCHAR GetCurrentIrpStackLocationIndex()
Definition: fxirpum.cpp:521
VOID SetCancel(__in BOOLEAN Cancel)
Definition: fxirpum.cpp:1294
KIRQL GetCancelIrql()
Definition: fxirpum.cpp:492
MdCompletionRoutine GetNextCompletionRoutine(VOID)
Definition: fxirpum.cpp:1206
VOID SetMajorFunction(__in UCHAR MajorFunction)
Definition: fxirpum.cpp:905
VOID SetParameterIoctlCode(__in ULONG DeviceIoControlCode)
Definition: fxirpum.cpp:1157
ULONG GetParameterIoctlOutputBufferLength(VOID)
Definition: fxirpum.cpp:1504
POWER_STATE_TYPE GetParameterPowerType()
Definition: fxirpum.cpp:683
VOID StartNextPowerIrp()
Definition: fxirpum.cpp:61
BOOLEAN HasStack(_In_ UCHAR StackCount)
Definition: fxirpum.cpp:1745
static PIO_STACK_LOCATION _GetAndClearNextStackLocation(__in MdIrp Irp)
Definition: fxirpkm.hpp:371
MdFileObject GetCurrentStackFileObject(VOID)
Definition: fxirpum.cpp:1258
BUS_QUERY_ID_TYPE GetParameterQueryIdType()
Definition: fxirpum.cpp:1006
POWER_STATE GetParameterPowerState()
Definition: fxirpum.cpp:1015
PMDL GetMdl()
Definition: fxirpum.cpp:625
static NTSTATUS STDCALL _IrpSynchronousCompletion(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp, __in PVOID Context)
Definition: fxirpum.cpp:133
VOID SetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:1235
USHORT GetParameterQueryInterfaceSize()
Definition: fxirpum.cpp:775
MdFileObject GetFileObject(VOID)
Definition: fxirpum.cpp:1460
USHORT GetParameterQueryInterfaceVersion()
Definition: fxirpum.cpp:765
VOID MarkIrpPending()
Definition: fxirpum.cpp:415
VOID SetParameterQDRType(__in DEVICE_RELATION_TYPE DeviceRelation)
Definition: fxirpkm.hpp:678
PCM_RESOURCE_LIST GetParameterAllocatedResourcesTranslated()
Definition: fxirpum.cpp:877
VOID SkipCurrentIrpStackLocation(VOID)
Definition: fxirpum.cpp:400
PVOID GetSystemBuffer()
Definition: fxirpum.cpp:543
VOID SetNextStackFlags(__in UCHAR Flags)
Definition: fxirpum.cpp:1556
PVOID GetParameterQueryInterfaceInterfaceSpecificData()
Definition: fxirpum.cpp:785
VOID PropagatePendingReturned(VOID)
Definition: fxirpum.cpp:443
VOID SetStatus(__in NTSTATUS Status)
Definition: fxirpum.cpp:457
PVOID GetDriverContext()
Definition: fxirpum.cpp:1673
SYSTEM_POWER_STATE GetParameterPowerStateSystemState()
Definition: fxirpum.cpp:707
PVOID GetOutputBuffer()
Definition: fxirpum.cpp:594
NTSTATUS GetStatus()
Definition: fxirpum.cpp:466
VOID CopyToNextIrpStackLocation(__in PIO_STACK_LOCATION Stack)
Definition: fxirpum.cpp:1216
const GUID * GetParameterQueryInterfaceType()
Definition: fxirpum.cpp:755
VOID SetNextParameterWriteLength(__in ULONG IoLength)
Definition: fxirpum.cpp:1398
VOID FreeIrp(VOID)
Definition: fxirpum.cpp:1648
PVOID * GetNextStackParameterOthersArgument1Pointer()
Definition: fxirpum.cpp:1421
VOID SetParameterAllocatedResourcesTranslated(__in PCM_RESOURCE_LIST AllocatedResourcesTranslated)
Definition: fxirpum.cpp:897
VOID SetParameterQueryInterfaceInterface(__in PINTERFACE Interface)
Definition: fxirpkm.hpp:1053
VOID SetNextStackFileObject(_In_ MdFileObject FileObject)
Definition: fxirpum.cpp:1573
PLIST_ENTRY ListEntry()
Definition: fxirpum.cpp:535
VOID SetParameterIoctlInputBufferLength(__in ULONG InputBufferLength)
Definition: fxirpum.cpp:1166
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
VOID SetParameterQueryInterfaceInterfaceSpecificData(__in PVOID InterfaceSpecificData)
Definition: fxirpkm.hpp:1091
PINTERFACE GetParameterQueryInterfaceInterface()
Definition: fxirpum.cpp:746
DEVICE_POWER_STATE GetParameterPowerStateDeviceState()
Definition: fxirpum.cpp:695
VOID SetParameterIoctlType3InputBuffer(__in PVOID Type3InputBuffer)
Definition: fxirpum.cpp:1175
PIO_STACK_LOCATION GetCurrentIrpStackLocation(VOID)
Definition: fxirpum.cpp:370
CCHAR GetStackCount()
Definition: fxirpum.cpp:1304
PVOID GetContext(__in ULONG Index)
Definition: fxirpum.cpp:361
ULONG GetDriverContextSize()
Definition: fxirpum.cpp:1682
static MdIrp GetIrpFromListEntry(__in PLIST_ENTRY Ple)
Definition: fxirpum.cpp:1190
BOOLEAN GetParameterSetLockLock()
Definition: fxirpum.cpp:993
VOID CopyCurrentIrpStackLocationToNext(VOID)
Definition: fxirpum.cpp:209
VOID CopyParameters(_Out_ PWDF_REQUEST_PARAMETERS Parameters)
Definition: fxirpum.cpp:1691
ULONG GetCurrentFlags(VOID)
Definition: fxirpum.cpp:1613
VOID SetInformation(__in ULONG_PTR Information)
Definition: fxirpum.cpp:504
PIO_STATUS_BLOCK GetStatusBlock(VOID)
Definition: fxirpum.cpp:1664
PIO_STACK_LOCATION GetNextIrpStackLocation(VOID)
Definition: fxirpum.cpp:387
BOOLEAN IsCurrentIrpStackLocationValid(VOID)
Definition: fxirpum.cpp:1761
VOID SetCompletionRoutine(__in MdCompletionRoutine CompletionRoutine, __in PVOID Context, __in BOOLEAN InvokeOnSuccess=TRUE, __in BOOLEAN InvokeOnError=TRUE, __in BOOLEAN InvokeOnCancel=TRUE)
Definition: fxirpum.cpp:72
MdIrp SetIrp(MdIrp irp)
Definition: fxirpkm.hpp:71
VOID SetUserBuffer(__in PVOID Value)
Definition: fxirpum.cpp:1341
PVOID GetCurrentParametersPointer(VOID)
Definition: fxirpum.cpp:1622
NTSTATUS PoCallDriver(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:48
BOOLEAN IsCanceled()
Definition: fxirpum.cpp:484
VOID SetParameterDeviceCapabilities(__in PDEVICE_CAPABILITIES DeviceCapabilities)
Definition: fxirpum.cpp:1145
UCHAR GetMinorFunction(VOID)
Definition: fxirpum.cpp:297
VOID SetParameterIoctlOutputBufferLength(__in ULONG OutputBufferLength)
Definition: fxirpum.cpp:1532
VOID SetParameterQueryInterfaceVersion(__in USHORT Version)
Definition: fxirpkm.hpp:1073
VOID SetContext(__in ULONG Index, __in PVOID Value)
Definition: fxirpum.cpp:351
ULONG GetParameterIoctlInputBufferLength(VOID)
Definition: fxirpum.cpp:1518
PVOID GetParameterIoctlType3InputBuffer(VOID)
Definition: fxirpum.cpp:1542
VOID ClearNextStackLocation(VOID)
Definition: fxirpum.cpp:1581
VOID SetNextStackParameterOthersArgument1(__in PVOID Argument1)
Definition: fxirpum.cpp:1411
VOID SetParameterAllocatedResources(__in PCM_RESOURCE_LIST AllocatedResources)
Definition: fxirpum.cpp:869
ULONG GetFlags(VOID)
Definition: fxirpum.cpp:1281
ULONG_PTR GetInformation()
Definition: fxirpum.cpp:513
VOID SetFlags(__in ULONG Flags)
Definition: fxirpum.cpp:1266
NTSTATUS CallDriver(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:36
VOID SetCurrentDeviceObject(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:1362
VOID CopyStatus(_Out_ PIO_STATUS_BLOCK StatusBlock)
Definition: fxirpum.cpp:1736
VOID SetNextParameterWriteByteOffsetQuadPart(__in LONGLONG DeviceOffset)
Definition: fxirpum.cpp:1385
ULONG GetParameterReadLength(VOID)
Definition: fxirpum.cpp:1589
static _Must_inspect_result_ NTSTATUS RequestPowerIrp(__in MdDeviceObject DeviceObject, __in UCHAR MinorFunction, __in POWER_STATE PowerState, __in MdRequestPowerComplete CompletionFunction, __in PVOID Context)
Definition: fxirpum.cpp:1047
LONGLONG GetParameterWriteByteOffsetQuadPart()
Definition: fxirpum.cpp:1373
VOID Reuse(__in NTSTATUS Status=STATUS_SUCCESS)
Definition: fxirpum.cpp:661
BOOLEAN GetNextStackParameterUsageNotificationInPath()
Definition: fxirpum.cpp:830
PVOID GetUserBuffer()
Definition: fxirpum.cpp:633
DEVICE_USAGE_NOTIFICATION_TYPE GetParameterUsageNotificationType()
Definition: fxirpum.cpp:801
BOOLEAN Is32bitProcess(VOID)
Definition: fxirpum.cpp:1640
VOID SetMdlAddress(__in PMDL Value)
Definition: fxirpum.cpp:1330
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
Definition: classp.h:1757
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: d3dkmdt.h:43
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define NTSTATUS
Definition: precomp.h:21
UCHAR KIRQL
Definition: env_spec_w32.h:591
IO_COMPLETION_ROUTINE MdCompletionRoutineType
Definition: fxirpkm.hpp:37
VOID(* PFX_CANCEL_ROUTINE)(__in FxDevice *Device, __in FxIrp *Irp, __in PVOID CancelContext)
Definition: fxirpkm.hpp:50
NTSTATUS(* PFX_COMPLETION_ROUTINE)(__in FxDevice *Device, __in FxIrp *Irp, __in PVOID Context)
Definition: fxirpkm.hpp:42
REQUEST_POWER_COMPLETE MdRequestPowerCompleteType
Definition: fxirpkm.hpp:38
PIRP MdIrp
Definition: fxirpkm.hpp:34
DRIVER_CANCEL MdCancelRoutineType
Definition: fxirpkm.hpp:36
REQUEST_POWER_COMPLETE * MdRequestPowerComplete
Definition: fxirpkm.hpp:38
IO_COMPLETION_ROUTINE * MdCompletionRoutine
Definition: fxirpkm.hpp:37
DRIVER_CANCEL * MdCancelRoutine
Definition: fxirpkm.hpp:36
FxIrp * irp
Status
Definition: gdiplustypes.h:25
struct _cl_event * event
Definition: glext.h:7739
NTSTATUS NTAPI IoSetCompletionRoutineEx(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_COMPLETION_ROUTINE CompletionRoutine, IN PVOID Context, IN BOOLEAN InvokeOnSuccess, IN BOOLEAN InvokeOnError, IN BOOLEAN InvokeOnCancel)
Definition: iocomp.c:220
IoMarkIrpPending(Irp)
IoSetCancelRoutine(Irp, CancelRoutine)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:490
void Cancel(int sigNum)
Definition: shell.c:481
PFILE_OBJECT MdFileObject
Definition: mxgeneralkm.h:32
IWudfIrp * MdIrp
Definition: mxum.h:103
WUDF_DRIVER_CANCEL * MdCancelRoutine
Definition: mxum.h:143
REQUEST_POWER_COMPLETE * MdRequestPowerComplete
Definition: mxum.h:162
WUDF_IO_COMPLETION_ROUTINE * MdCompletionRoutine
Definition: mxum.h:142
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
Definition: ndis.h:4643
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResourcesTranslated
Definition: ndis.h:4644
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCopyCurrentIrpStackLocationToNext(Irp)
Definition: ntifs_ex.h:413
#define IoCompleteRequest
Definition: irp.c:1240
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:615
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
Definition: irp.c:1971
BOOLEAN NTAPI IoCancelIrp(IN PIRP Irp)
Definition: irp.c:1101
#define IoCallDriver
Definition: irp.c:1225
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1666
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
Definition: power.c:758
NTSTATUS NTAPI PoRequestPowerIrp(_In_ PDEVICE_OBJECT DeviceObject, _In_ UCHAR MinorFunction, _In_ POWER_STATE PowerState, _In_opt_ PREQUEST_POWER_COMPLETE CompletionFunction, _In_opt_ __drv_aliasesMem PVOID Context, _Outptr_opt_ PIRP *pIrp)
Definition: power.c:659
enum _POWER_STATE_TYPE POWER_STATE_TYPE
POWER_ACTION
Definition: ntpoapi.h:122
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
unsigned short USHORT
Definition: pedump.c:61
DWORD LCID
Definition: nls.h:13
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: shellext.h:68
PFILE_OBJECT FileObject
Definition: iotypes.h:3169
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:3223
struct _IO_STACK_LOCATION::@1579::@1580 DeviceIoControl
struct _IO_STACK_LOCATION::@3978::@4017 Others
union _IO_STACK_LOCATION::@1579 Parameters
struct _IO_STACK_LOCATION::@3978::@4015 StartDevice
struct _IO_STACK_LOCATION::@3978::@4003 QueryDeviceRelations
struct _IO_STACK_LOCATION::@3978::@4004 QueryInterface
struct _IO_STACK_LOCATION::@3978::@3983 Write
struct _IO_STACK_LOCATION::@3978::@4010 QueryDeviceText
PIO_COMPLETION_ROUTINE CompletionRoutine
Definition: iotypes.h:3314
struct _IO_STACK_LOCATION::@3978::@4005 DeviceCapabilities
struct _IO_STACK_LOCATION::@3978::@4008 SetLock
struct _IO_STACK_LOCATION::@3978::@3982 Read
struct _IO_STACK_LOCATION::@3978::@4009 QueryId
struct _IO_STACK_LOCATION::@3978::@4011 UsageNotification
Definition: typedefs.h:120
Definition: format.c:80
Definition: ps.c:97
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int64_t LONGLONG
Definition: typedefs.h:68
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
char CCHAR
Definition: typedefs.h:51
#define STDCALL
Definition: wdf.h:45
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ UCHAR MajorFunction
Definition: wdfdevice.h:1697
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3034
_In_ UCHAR _In_ UCHAR MinorFunction
Definition: wdfdevice.h:1699
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:472
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG DeviceOffset
Definition: wdfiotarget.h:865
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFREQUEST _In_ NTSTATUS _In_ CCHAR PriorityBoost
Definition: wdfrequest.h:1016
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
#define DeviceCapabilities
Definition: wingdi.h:4449
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
_In_opt_ PDRIVER_CANCEL CancelRoutine
Definition: iofuncs.h:2744
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
Definition: iofuncs.h:2680
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
Definition: iofuncs.h:1943
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
Definition: iofuncs.h:1944
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
Definition: iofuncs.h:1942
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
#define METHOD_FROM_CTL_CODE(ctrlCode)
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965
enum _DEVICE_TEXT_TYPE DEVICE_TEXT_TYPE
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
enum _DEVICE_USAGE_NOTIFICATION_TYPE DEVICE_USAGE_NOTIFICATION_TYPE
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ UCHAR _In_ POWER_STATE _In_opt_ PREQUEST_POWER_COMPLETE CompletionFunction
Definition: pofuncs.h:44
unsigned char UCHAR
Definition: xmlstorage.h:181