ReactOS  r76032
iofuncs.h
Go to the documentation of this file.
1 /******************************************************************************
2  * I/O Manager Functions *
3  ******************************************************************************/
4 
6 /*
7  * NTSTATUS
8  * IoAcquireRemoveLock(
9  * IN PIO_REMOVE_LOCK RemoveLock,
10  * IN OPTIONAL PVOID Tag)
11  */
12 #if DBG
13 #define IoAcquireRemoveLock(RemoveLock, Tag) \
14  IoAcquireRemoveLockEx(RemoveLock, Tag, __FILE__, __LINE__, sizeof (IO_REMOVE_LOCK))
15 #else
16 #define IoAcquireRemoveLock(RemoveLock, Tag) \
17  IoAcquireRemoveLockEx(RemoveLock, Tag, "", 1, sizeof (IO_REMOVE_LOCK))
18 #endif
19 
20 /*
21  * VOID
22  * IoAdjustPagingPathCount(
23  * IN PLONG Count,
24  * IN BOOLEAN Increment)
25  */
26 #define IoAdjustPagingPathCount(_Count, \
27  _Increment) \
28 { \
29  if (_Increment) \
30  { \
31  InterlockedIncrement(_Count); \
32  } \
33  else \
34  { \
35  InterlockedDecrement(_Count); \
36  } \
37 }
38 
39 #if !defined(_M_AMD64)
41 VOID
42 NTAPI
44  IN PUCHAR Port,
46  IN ULONG Count);
47 
49 VOID
50 NTAPI
52  IN PULONG Port,
54  IN ULONG Count);
55 
57 VOID
58 NTAPI
60  IN PUSHORT Port,
62  IN ULONG Count);
63 
65 UCHAR
66 NTAPI
68  IN PUCHAR Port);
69 
71 ULONG
72 NTAPI
74  IN PULONG Port);
75 
77 USHORT
78 NTAPI
80  IN PUSHORT Port);
81 
83 VOID
84 NTAPI
86  IN PUCHAR Register,
88  IN ULONG Count);
89 
91 VOID
92 NTAPI
94  IN PULONG Register,
96  IN ULONG Count);
97 
99 VOID
100 NTAPI
102  IN PUSHORT Register,
103  IN PUSHORT Buffer,
104  IN ULONG Count);
105 
107 UCHAR
108 NTAPI
110  IN PUCHAR Register);
111 
113 ULONG
114 NTAPI
116  IN PULONG Register);
117 
119 USHORT
120 NTAPI
122  IN PUSHORT Register);
123 
124 NTHALAPI
125 VOID
126 NTAPI
128  IN PUCHAR Port,
129  IN PUCHAR Buffer,
130  IN ULONG Count);
131 
132 NTHALAPI
133 VOID
134 NTAPI
136  IN PULONG Port,
137  IN PULONG Buffer,
138  IN ULONG Count);
139 
140 NTHALAPI
141 VOID
142 NTAPI
144  IN PUSHORT Port,
145  IN PUSHORT Buffer,
146  IN ULONG Count);
147 
148 NTHALAPI
149 VOID
150 NTAPI
152  IN PUCHAR Port,
153  IN UCHAR Value);
154 
155 NTHALAPI
156 VOID
157 NTAPI
159  IN PULONG Port,
160  IN ULONG Value);
161 
162 NTHALAPI
163 VOID
164 NTAPI
166  IN PUSHORT Port,
167  IN USHORT Value);
168 
170 VOID
171 NTAPI
173  IN PUCHAR Register,
174  IN PUCHAR Buffer,
175  IN ULONG Count);
176 
178 VOID
179 NTAPI
181  IN PULONG Register,
182  IN PULONG Buffer,
183  IN ULONG Count);
184 
186 VOID
187 NTAPI
189  IN PUSHORT Register,
190  IN PUSHORT Buffer,
191  IN ULONG Count);
192 
194 VOID
195 NTAPI
197  IN PUCHAR Register,
198  IN UCHAR Value);
199 
201 VOID
202 NTAPI
204  IN PULONG Register,
205  IN ULONG Value);
206 
208 VOID
209 NTAPI
211  IN PUSHORT Register,
212  IN USHORT Value);
213 
214 #else
215 
217 VOID
219  IN PUCHAR Port,
220  IN PUCHAR Buffer,
221  IN ULONG Count)
222 {
223  __inbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count);
224 }
225 
227 VOID
229  IN PULONG Port,
230  IN PULONG Buffer,
231  IN ULONG Count)
232 {
233  __indwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
234 }
235 
237 VOID
239  IN PUSHORT Port,
240  IN PUSHORT Buffer,
241  IN ULONG Count)
242 {
243  __inwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
244 }
245 
247 UCHAR
249  IN PUCHAR Port)
250 {
251  return __inbyte((USHORT)(ULONG_PTR)Port);
252 }
253 
255 ULONG
257  IN PULONG Port)
258 {
259  return __indword((USHORT)(ULONG_PTR)Port);
260 }
261 
263 USHORT
265  IN PUSHORT Port)
266 {
267  return __inword((USHORT)(ULONG_PTR)Port);
268 }
269 
271 VOID
273  IN PUCHAR Register,
274  IN PUCHAR Buffer,
275  IN ULONG Count)
276 {
277  __movsb(Register, Buffer, Count);
278 }
279 
281 VOID
283  IN PULONG Register,
284  IN PULONG Buffer,
285  IN ULONG Count)
286 {
287  __movsd(Register, Buffer, Count);
288 }
289 
291 VOID
293  IN PUSHORT Register,
294  IN PUSHORT Buffer,
295  IN ULONG Count)
296 {
297  __movsw(Register, Buffer, Count);
298 }
299 
301 UCHAR
303  IN volatile UCHAR *Register)
304 {
305  return *Register;
306 }
307 
309 ULONG
311  IN volatile ULONG *Register)
312 {
313  return *Register;
314 }
315 
317 USHORT
319  IN volatile USHORT *Register)
320 {
321  return *Register;
322 }
323 
325 VOID
327  IN PUCHAR Port,
328  IN PUCHAR Buffer,
329  IN ULONG Count)
330 {
331  __outbytestring((USHORT)(ULONG_PTR)Port, Buffer, Count);
332 }
333 
335 VOID
337  IN PULONG Port,
338  IN PULONG Buffer,
339  IN ULONG Count)
340 {
341  __outdwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
342 }
343 
345 VOID
347  IN PUSHORT Port,
348  IN PUSHORT Buffer,
349  IN ULONG Count)
350 {
351  __outwordstring((USHORT)(ULONG_PTR)Port, Buffer, Count);
352 }
353 
355 VOID
357  IN PUCHAR Port,
358  IN UCHAR Value)
359 {
360  __outbyte((USHORT)(ULONG_PTR)Port, Value);
361 }
362 
364 VOID
366  IN PULONG Port,
367  IN ULONG Value)
368 {
369  __outdword((USHORT)(ULONG_PTR)Port, Value);
370 }
371 
373 VOID
375  IN PUSHORT Port,
376  IN USHORT Value)
377 {
378  __outword((USHORT)(ULONG_PTR)Port, Value);
379 }
380 
382 VOID
384  IN PUCHAR Register,
385  IN PUCHAR Buffer,
386  IN ULONG Count)
387 {
388  LONG Synch;
389  __movsb(Register, Buffer, Count);
390  InterlockedOr(&Synch, 1);
391 }
392 
394 VOID
396  IN PULONG Register,
397  IN PULONG Buffer,
398  IN ULONG Count)
399 {
400  LONG Synch;
401  __movsd(Register, Buffer, Count);
402  InterlockedOr(&Synch, 1);
403 }
404 
406 VOID
408  IN PUSHORT Register,
409  IN PUSHORT Buffer,
410  IN ULONG Count)
411 {
412  LONG Synch;
413  __movsw(Register, Buffer, Count);
414  InterlockedOr(&Synch, 1);
415 }
416 
418 VOID
420  IN volatile UCHAR *Register,
421  IN UCHAR Value)
422 {
423  LONG Synch;
424  *Register = Value;
425  InterlockedOr(&Synch, 1);
426 }
427 
429 VOID
431  IN volatile ULONG *Register,
432  IN ULONG Value)
433 {
434  LONG Synch;
435  *Register = Value;
436  InterlockedOr(&Synch, 1);
437 }
438 
440 VOID
442  IN volatile USHORT *Register,
443  IN USHORT Value)
444 {
445  LONG Sync;
446  *Register = Value;
447  InterlockedOr(&Sync, 1);
448 }
449 #endif
450 
451 #if defined(USE_DMA_MACROS) && !defined(_NTHAL_) && \
452  (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_)
453 
454 #define DMA_MACROS_DEFINED
455 
459 NTSTATUS
461  _In_ PDMA_ADAPTER DmaAdapter,
466 {
467  PALLOCATE_ADAPTER_CHANNEL AllocateAdapterChannel;
468  AllocateAdapterChannel =
469  *(DmaAdapter)->DmaOperations->AllocateAdapterChannel;
470  ASSERT(AllocateAdapterChannel);
471  return AllocateAdapterChannel(DmaAdapter,
472  DeviceObject,
473  NumberOfMapRegisters,
474  ExecutionRoutine,
475  Context);
476 }
477 
479 BOOLEAN
480 NTAPI
482  _In_ PDMA_ADAPTER DmaAdapter,
483  _In_ PMDL Mdl,
485  _In_ PVOID CurrentVa,
486  _In_ ULONG Length,
487  _In_ BOOLEAN WriteToDevice)
488 {
489  PFLUSH_ADAPTER_BUFFERS FlushAdapterBuffers;
490  FlushAdapterBuffers = *(DmaAdapter)->DmaOperations->FlushAdapterBuffers;
491  ASSERT(FlushAdapterBuffers);
492  return FlushAdapterBuffers(DmaAdapter,
493  Mdl,
494  MapRegisterBase,
495  CurrentVa,
496  Length,
497  WriteToDevice);
498 }
499 
501 VOID
502 NTAPI
504  _In_ PDMA_ADAPTER DmaAdapter)
505 {
506  PFREE_ADAPTER_CHANNEL FreeAdapterChannel;
507  FreeAdapterChannel = *(DmaAdapter)->DmaOperations->FreeAdapterChannel;
508  ASSERT(FreeAdapterChannel);
509  FreeAdapterChannel(DmaAdapter);
510 }
511 
513 VOID
514 NTAPI
516  _In_ PDMA_ADAPTER DmaAdapter,
517  _In_ PVOID MapRegisterBase,
518  _In_ ULONG NumberOfMapRegisters)
519 {
520  PFREE_MAP_REGISTERS FreeMapRegisters;
521  FreeMapRegisters = *(DmaAdapter)->DmaOperations->FreeMapRegisters;
522  ASSERT(FreeMapRegisters);
523  FreeMapRegisters(DmaAdapter, MapRegisterBase, NumberOfMapRegisters);
524 }
525 
528 NTAPI
530  _In_ PDMA_ADAPTER DmaAdapter,
531  _In_ PMDL Mdl,
532  _In_ PVOID MapRegisterBase,
533  _In_ PVOID CurrentVa,
534  _Inout_ PULONG Length,
535  _In_ BOOLEAN WriteToDevice)
536 {
537  PMAP_TRANSFER MapTransfer;
538 
539  MapTransfer = *(DmaAdapter)->DmaOperations->MapTransfer;
540  ASSERT(MapTransfer);
541  return MapTransfer(DmaAdapter,
542  Mdl,
543  MapRegisterBase,
544  CurrentVa,
545  Length,
546  WriteToDevice);
547 }
548 #endif
549 
551 $if (_NTDDK_)
552 /*
553  * VOID IoAssignArcName(
554  * IN PUNICODE_STRING ArcName,
555  * IN PUNICODE_STRING DeviceName);
556  */
557 #define IoAssignArcName(_ArcName, _DeviceName) ( \
558  IoCreateSymbolicLink((_ArcName), (_DeviceName)))
559 
560 /*
561  * VOID
562  * IoDeassignArcName(
563  * IN PUNICODE_STRING ArcName)
564  */
565 #define IoDeassignArcName IoDeleteSymbolicLink
566 
568 VOID
569 NTAPI
570 IoInitializeDriverCreateContext(
572 {
573  RtlZeroMemory(DriverContext, sizeof(IO_DRIVER_CREATE_CONTEXT));
574  DriverContext->Size = sizeof(IO_DRIVER_CREATE_CONTEXT);
575 }
576 
577 $endif (_NTDDK_)
578 $if (_NTIFS_)
579 #define IoIsFileOpenedExclusively(FileObject) ( \
580  (BOOLEAN) !( \
581  (FileObject)->SharedRead || \
582  (FileObject)->SharedWrite || \
583  (FileObject)->SharedDelete \
584  ) \
585 )
586 
587 #if (NTDDI_VERSION == NTDDI_WIN2K)
589 NTSTATUS
590 NTAPI
591 IoRegisterFsRegistrationChangeEx(
594 #endif
595 $endif (_NTIFS_)
596 #if (NTDDI_VERSION >= NTDDI_WIN2K)
597 
598 $if (_WDMDDK_)
599 _Acquires_lock_(_Global_cancel_spin_lock_)
600 _Requires_lock_not_held_(_Global_cancel_spin_lock_)
604 VOID
605 NTAPI
608 
611 NTSTATUS
612 NTAPI
614  _Inout_ PIO_REMOVE_LOCK RemoveLock,
616  _In_ PCSTR File,
617  _In_ ULONG Line,
619 
621 _Ret_range_(<=, 0)
623 NTSTATUS
624 NTAPI
628  _In_ ULONG DriverObjectExtensionSize,
629  _Post_ _At_(*DriverObjectExtension, _When_(return==0,
631  _When_(return == 0, _Outptr_result_bytebuffer_(DriverObjectExtensionSize))
632  PVOID *DriverObjectExtension);
633 
636 PVOID
637 NTAPI
641 
645 PIRP
646 NTAPI
650 
653 PMDL
654 NTAPI
657  _In_ ULONG Length,
659  _In_ BOOLEAN ChargeQuota,
661 
666 NTAPI
668  _In_ PDEVICE_OBJECT DeviceObject);
669 
671 _Ret_range_(<=, 0)
673 NTSTATUS
674 NTAPI
679  _Out_ PDEVICE_OBJECT *AttachedDevice);
680 
685 NTAPI
688  PDEVICE_OBJECT SourceDevice,
689  _In_ PDEVICE_OBJECT TargetDevice);
690 
695 PIRP
696 NTAPI
698  _In_ ULONG MajorFunction,
699  _In_ PDEVICE_OBJECT DeviceObject,
700  _Inout_opt_ PVOID Buffer,
701  _In_opt_ ULONG Length,
704 
709 PIRP
710 NTAPI
713  _In_ PDEVICE_OBJECT DeviceObject,
720  _Out_ PIO_STATUS_BLOCK IoStatusBlock);
721 
724 VOID
725 NTAPI
727  _In_ PMDL SourceMdl,
729  _In_ PVOID VirtualAddress,
730  _In_ ULONG Length);
731 
736 PIRP
737 NTAPI
739  _In_ ULONG MajorFunction,
740  _In_ PDEVICE_OBJECT DeviceObject,
741  _Inout_opt_ PVOID Buffer,
742  _In_opt_ ULONG Length,
743  _In_opt_ PLARGE_INTEGER StartingOffset,
744  _In_ PKEVENT Event,
745  _Out_ PIO_STATUS_BLOCK IoStatusBlock);
746 
750 NTSTATUS
751 FASTCALL
753  _In_ PDEVICE_OBJECT DeviceObject,
755 #define IoCallDriver IofCallDriver
756 
759 VOID
760 FASTCALL
762  _In_ PIRP Irp,
764 #define IoCompleteRequest IofCompleteRequest
765 
768 BOOLEAN
769 NTAPI
771  _In_ PIRP Irp);
772 
775 NTSTATUS
776 NTAPI
783 
786 VOID
787 FASTCALL
789  _In_ PIRP Irp,
790  _In_ CCHAR PriorityBoost);
791 
794 NTSTATUS
795 NTAPI
801  _In_ ULONG Vector,
802  _In_ KIRQL Irql,
808 
810 _Ret_range_(<=, 0)
812 NTSTATUS
813 NTAPI
815  _In_ PDRIVER_OBJECT DriverObject,
816  _In_ ULONG DeviceExtensionSize,
819  _In_ ULONG DeviceCharacteristics,
820  _In_ BOOLEAN Exclusive,
822  _At_(*DeviceObject,
823  __drv_allocatesMem(Mem)
824  _When_(((_In_function_class_(DRIVER_INITIALIZE))
825  ||(_In_function_class_(DRIVER_DISPATCH))),
827  PDEVICE_OBJECT *DeviceObject);
828 
831 NTSTATUS
832 NTAPI
835  _In_ ACCESS_MASK DesiredAccess,
837  _Out_ PIO_STATUS_BLOCK IoStatusBlock,
840  _In_ ULONG ShareAccess,
847  _In_ ULONG Options);
848 
851 PKEVENT
852 NTAPI
854  _In_ PUNICODE_STRING EventName,
856 
859 NTSTATUS
860 NTAPI
862  _In_ PUNICODE_STRING SymbolicLinkName,
863  _In_ PUNICODE_STRING DeviceName);
864 
867 PKEVENT
868 NTAPI
870  _In_ PUNICODE_STRING EventName,
871  _Out_ PHANDLE EventHandle);
872 
875 NTSTATUS
876 NTAPI
878  _In_ PUNICODE_STRING SymbolicLinkName,
879  _In_ PUNICODE_STRING DeviceName);
880 
884 VOID
885 NTAPI
888  PDEVICE_OBJECT DeviceObject);
889 
892 NTSTATUS
893 NTAPI
895  _In_ PUNICODE_STRING SymbolicLinkName);
896 
899 VOID
900 NTAPI
902  _Inout_ PDEVICE_OBJECT TargetDevice);
903 
906 VOID
907 NTAPI
909  _In_ PKINTERRUPT InterruptObject);
910 
911 __drv_freesMem(Mem)
914 VOID
915 NTAPI
916 IoFreeIrp(
917  _In_ PIRP Irp);
918 
921 VOID
922 NTAPI
923 IoFreeMdl(
924  PMDL Mdl);
925 
928 VOID
929 NTAPI
932 
935 NTAPI
937  IN PDEVICE_OBJECT DeviceObject);
938 
942 NTAPI
944  _In_ PDEVICE_OBJECT DeviceObject);
945 
947 NTSTATUS
948 NTAPI
950  _Inout_ PBOOTDISK_INFORMATION BootDiskInformation,
951  _In_ ULONG Size);
952 
956 NTSTATUS
957 NTAPI
959  _In_ PUNICODE_STRING SymbolicLinkName,
961  _Out_
962  _When_(return==0, _At_(AliasSymbolicLinkName->Buffer, __drv_allocatesMem(Mem)))
963  PUNICODE_STRING AliasSymbolicLinkName);
964 
966 PEPROCESS
967 NTAPI
969 
973 NTSTATUS
974 NTAPI
978  _In_ ULONG Flags,
980  _At_(*SymbolicLinkList, _When_(return==0, __drv_allocatesMem(Mem)))
981  PZZWSTR *SymbolicLinkList);
982 
985 NTSTATUS
986 NTAPI
989  _In_ ACCESS_MASK DesiredAccess,
990  _Out_ PFILE_OBJECT *FileObject,
991  _Out_ PDEVICE_OBJECT *DeviceObject);
992 
995  _At_(PropertyBuffer, _Post_z_))
997  _At_(PropertyBuffer, _Post_ _NullNull_terminated_))
999 NTSTATUS
1000 NTAPI
1002  _In_ PDEVICE_OBJECT DeviceObject,
1005  _Out_writes_bytes_opt_(BufferLength) PVOID PropertyBuffer,
1006  _Deref_out_range_(<=, BufferLength) PULONG ResultLength);
1007 
1012 NTAPI
1014  _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject,
1016  _Out_ _When_(return!=0, _Kernel_IoGetDmaAdapter_ _At_(*NumberOfMapRegisters, _Must_inspect_result_))
1017  PULONG NumberOfMapRegisters);
1018 
1022 PVOID
1023 NTAPI
1025  _In_ PDRIVER_OBJECT DriverObject,
1026  _In_ PVOID ClientIdentificationAddress);
1027 
1030 PVOID
1031 NTAPI
1032 IoGetInitialStack(VOID);
1033 
1036 NTAPI
1038  _In_ PFILE_OBJECT FileObject);
1039 
1042 VOID
1043 NTAPI
1045  _Inout_ PIO_WORKITEM IoWorkItem,
1048  _In_opt_ __drv_aliasesMem PVOID Context);
1049 
1052 VOID
1053 NTAPI
1055  _Inout_ PIRP Irp,
1057  _In_ CCHAR StackSize);
1058 
1061 VOID
1062 NTAPI
1068  _In_ ULONG RemlockSize);
1069 
1072 NTSTATUS
1073 NTAPI
1075  _In_ PDEVICE_OBJECT DeviceObject,
1077  _In_opt_ __drv_aliasesMem PVOID Context);
1078 
1081 VOID
1082 NTAPI
1084  _In_ PDEVICE_OBJECT DeviceObject,
1086 
1089 VOID
1090 NTAPI
1092  _In_ PDEVICE_OBJECT PhysicalDeviceObject);
1093 
1096 BOOLEAN
1097 NTAPI
1099  _When_(MajorVersion!=1&&MajorVersion!=6, _In_ __drv_reportError("MajorVersion must be 1 or 6"))
1100  UCHAR MajorVersion,
1101  _In_ _When_(MinorVersion!=0 && MinorVersion!=5 &&
1102  MinorVersion!=16 && MinorVersion!=32 &&
1103  MinorVersion!=48, __drv_reportError("MinorVersion must be 0, 0x5, 0x10, 0x20, or 0x30"))
1104  UCHAR MinorVersion);
1105 
1109 NTSTATUS
1110 NTAPI
1112  _In_ PUNICODE_STRING SymbolicLinkName,
1113  _In_ ACCESS_MASK DesiredAccess,
1115 
1119 NTSTATUS
1120 NTAPI
1122  _In_ PDEVICE_OBJECT DeviceObject,
1124  _In_ ACCESS_MASK DesiredAccess,
1126 
1130 NTSTATUS
1131 NTAPI
1133  _In_ PDEVICE_OBJECT PhysicalDeviceObject,
1134  _In_ CONST GUID *InterfaceClassGuid,
1136  _Out_ _When_(return==0, _At_(SymbolicLinkName->Buffer, __drv_allocatesMem(Mem)))
1137  PUNICODE_STRING SymbolicLinkName);
1138 
1142 NTSTATUS
1143 NTAPI
1145  _In_ IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
1148  _In_ PDRIVER_OBJECT DriverObject,
1152  _At_(*NotificationEntry, _When_(return==0, __drv_allocatesMem(Mem)))
1153  PVOID *NotificationEntry);
1154 
1157 NTSTATUS
1158 NTAPI
1160  _In_ PDEVICE_OBJECT DeviceObject);
1161 
1162 _Requires_lock_held_(_Global_cancel_spin_lock_)
1163 _Releases_lock_(_Global_cancel_spin_lock_)
1167 VOID
1168 NTAPI
1171 
1174 VOID
1175 NTAPI
1177  _Inout_ PIO_REMOVE_LOCK RemoveLock,
1178  _In_opt_ PVOID Tag,
1179  _In_ ULONG RemlockSize);
1180 
1182 VOID
1183 NTAPI
1185  _Inout_ PIO_REMOVE_LOCK RemoveLock,
1186  _In_opt_ PVOID Tag,
1187  _In_ ULONG RemlockSize);
1188 
1191 VOID
1192 NTAPI
1194  _In_ PFILE_OBJECT FileObject,
1195  _Inout_ PSHARE_ACCESS ShareAccess);
1196 
1199 NTSTATUS
1200 NTAPI
1202  _In_ PDEVICE_OBJECT PhysicalDeviceObject,
1204 
1207 NTSTATUS
1208 NTAPI
1210  _In_ PDEVICE_OBJECT PhysicalDeviceObject,
1211  _In_ PVOID NotificationStructure,
1213  _In_opt_ PVOID Context);
1214 
1217 VOID
1218 NTAPI
1220  _In_ PDEVICE_OBJECT PhysicalDeviceObject);
1221 
1224 VOID
1225 NTAPI
1226 IoReuseIrp(
1227  _Inout_ PIRP Irp,
1229 
1233 NTSTATUS
1234 NTAPI
1236  _In_ PUNICODE_STRING SymbolicLinkName,
1238 
1240 VOID
1241 NTAPI
1243  _In_ ACCESS_MASK DesiredAccess,
1244  _In_ ULONG DesiredShareAccess,
1245  _Inout_ PFILE_OBJECT FileObject,
1246  _Out_ PSHARE_ACCESS ShareAccess);
1247 
1251 VOID
1252 NTAPI
1254  _In_ PDEVICE_OBJECT DeviceObject,
1256 
1259 VOID
1260 NTAPI
1262  _In_ PDEVICE_OBJECT DeviceObject,
1263  _In_ BOOLEAN Cancelable,
1264  _In_ ULONG Key);
1265 
1268 VOID
1269 NTAPI
1271  _In_ PDEVICE_OBJECT DeviceObject,
1272  _In_ PIRP Irp,
1273  _In_opt_ PULONG Key,
1275 
1278 VOID
1279 NTAPI
1280 IoStartTimer(
1281  _In_ PDEVICE_OBJECT DeviceObject);
1282 
1285 VOID
1286 NTAPI
1287 IoStopTimer(
1288  _In_ PDEVICE_OBJECT DeviceObject);
1289 
1293 NTSTATUS
1294 NTAPI
1296  _In_ PVOID NotificationEntry);
1297 
1300 VOID
1301 NTAPI
1303  _In_ PDEVICE_OBJECT DeviceObject);
1304 
1307 VOID
1308 NTAPI
1310  _In_ PFILE_OBJECT FileObject,
1311  _Inout_ PSHARE_ACCESS ShareAccess);
1312 
1315 NTSTATUS
1316 NTAPI
1318  _In_ GUID *Guid,
1321 
1323 NTSTATUS
1324 NTAPI
1326  _In_reads_(ObjectCount) PVOID *DataBlockObjectList,
1327  _In_reads_(ObjectCount) PUNICODE_STRING InstanceNames,
1329  _Inout_ ULONG *InOutBufferSize,
1330  _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer);
1331 
1334 NTSTATUS
1335 NTAPI
1337  _In_ PDEVICE_OBJECT DeviceObject,
1339 
1341 NTSTATUS
1342 NTAPI
1344  _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject,
1345  _In_opt_ PUNICODE_STRING SymbolicLinkName,
1346  _In_ BOOLEAN CombineNames,
1347  _Out_ PUNICODE_STRING SuggestedInstanceName);
1348 
1351 _Ret_range_(<=, 0)
1353 NTSTATUS
1354 NTAPI
1356  _Inout_ _When_(return==0, __drv_aliasesMem) PVOID WnodeEventItem);
1357 
1360 VOID
1361 NTAPI
1363  _In_ PVOID ElEntry);
1364 
1366 PIRP
1367 NTAPI
1368 IoGetTopLevelIrp(VOID);
1369 
1372 NTSTATUS
1373 NTAPI
1375  _In_ PDEVICE_OBJECT DeviceObject);
1376 
1378 VOID
1379 NTAPI
1381  _In_opt_ PIRP Irp);
1382 
1383 $endif (_WDMDDK_)
1384 $if (_NTDDK_)
1385 #if !(defined(USE_DMA_MACROS) && (defined(_NTDDK_) || defined(_NTDRIVER_)) || defined(_WDM_INCLUDED_))
1389 NTSTATUS
1390 NTAPI
1392  _In_ PADAPTER_OBJECT AdapterObject,
1393  _In_ PDEVICE_OBJECT DeviceObject,
1394  _In_ ULONG NumberOfMapRegisters,
1395  _In_ PDRIVER_CONTROL ExecutionRoutine,
1396  _In_ PVOID Context);
1397 #endif
1398 
1399 #if !defined(DMA_MACROS_DEFINED)
1400 //DECLSPEC_DEPRECATED_DDK
1401 NTHALAPI
1403 NTAPI
1405  _In_ PADAPTER_OBJECT AdapterObject,
1406  _In_ PMDL Mdl,
1407  _In_ PVOID MapRegisterBase,
1408  _In_ PVOID CurrentVa,
1409  _Inout_ PULONG Length,
1410  _In_ BOOLEAN WriteToDevice);
1411 #endif
1412 
1416 VOID
1417 NTAPI
1419  _In_ PCONTROLLER_OBJECT ControllerObject,
1420  _In_ PDEVICE_OBJECT DeviceObject,
1421  _In_ PDRIVER_CONTROL ExecutionRoutine,
1422  _In_opt_ PVOID Context);
1423 
1427 NTAPI
1429  _In_ ULONG Size);
1430 
1433 VOID
1434 NTAPI
1436  _In_ PCONTROLLER_OBJECT ControllerObject);
1437 
1441 VOID
1442 NTAPI
1444  _In_ PCONTROLLER_OBJECT ControllerObject);
1445 
1449 NTAPI
1451 
1455 NTAPI
1457  _In_ PETHREAD Thread);
1458 
1460 VOID
1461 NTAPI
1463  _In_ PDEVICE_OBJECT DeviceObject,
1464  _In_ PFILE_OBJECT FileObject);
1465 
1469 NTAPI
1471 
1474 PIRP
1475 NTAPI
1477  _In_ PIRP Irp,
1478  _In_ CCHAR StackSize);
1479 
1481 NTSTATUS
1482 NTAPI
1486  _In_opt_ PCONFIGURATION_TYPE ControllerType,
1487  _In_opt_ PULONG ControllerNumber,
1488  _In_opt_ PCONFIGURATION_TYPE PeripheralType,
1489  _In_opt_ PULONG PeripheralNumber,
1490  _In_ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine,
1491  _Inout_opt_ PVOID Context);
1492 
1495 VOID
1496 NTAPI
1498  _In_ PIRP Irp,
1501 
1504 BOOLEAN
1505 NTAPI
1507  _In_ NTSTATUS ErrorStatus,
1509  _In_opt_ PKTHREAD Thread);
1510 
1513 VOID
1514 NTAPI
1516  _In_ PDRIVER_OBJECT DriverObject,
1518  _In_opt_ PVOID Context);
1519 
1522 VOID
1523 NTAPI
1525  _In_ PDRIVER_OBJECT DriverObject,
1526  _In_ PDRIVER_REINITIALIZE DriverReinitializationRoutine,
1527  _In_opt_ PVOID Context);
1528 
1530 NTSTATUS
1531 NTAPI
1533  _In_ PDEVICE_OBJECT SourceDevice,
1534  _In_ PDEVICE_OBJECT TargetDevice);
1535 
1539 NTSTATUS
1540 NTAPI
1542  _In_ PDRIVER_OBJECT DriverObject,
1544  _In_ ULONG BusNumber,
1549  _Inout_ PDEVICE_OBJECT *DeviceObject);
1550 
1552 NTSTATUS
1553 NTAPI
1555  _In_ PDRIVER_OBJECT DriverObject,
1556  _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList,
1557  _In_opt_ ULONG DriverListSize,
1558  _In_opt_ PDEVICE_OBJECT DeviceObject,
1560  _In_opt_ ULONG DeviceListSize,
1561  _Out_ PBOOLEAN ConflictDetected);
1562 
1564 NTSTATUS
1565 NTAPI
1568  _In_ PDRIVER_OBJECT DriverObject,
1569  _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList,
1570  _In_opt_ ULONG DriverListSize,
1571  _In_opt_ PDEVICE_OBJECT DeviceObject,
1572  _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList,
1573  _In_opt_ ULONG DeviceListSize,
1574  _In_ BOOLEAN OverrideConflict,
1575  _Out_ PBOOLEAN ConflictDetected);
1576 
1579 VOID
1580 NTAPI
1582  _In_ PIRP Irp,
1583  _In_ PDEVICE_OBJECT DeviceObject);
1584 
1586 NTSTATUS
1587 NTAPI
1590  _In_opt_ PUNICODE_STRING DriverClassName,
1591  _In_ PDRIVER_OBJECT DriverObject,
1592  _In_opt_ PDEVICE_OBJECT DeviceObject,
1593  _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources,
1595 
1598 BOOLEAN
1599 NTAPI
1601  _In_ BOOLEAN EnableHardErrors);
1602 
1603 $endif (_NTDDK_)
1604 $if (_NTIFS_)
1605 
1607 VOID
1608 NTAPI
1610  _Out_ PKIRQL Irql);
1611 
1613 NTSTATUS
1614 NTAPI
1616  _Inout_ PACCESS_MASK DesiredAccess,
1618 
1620 NTSTATUS
1621 NTAPI
1624  _In_ ULONG EaLength,
1625  _Out_ PULONG ErrorOffset);
1626 
1628 NTSTATUS
1629 NTAPI
1631  _In_ ACCESS_MASK GrantedAccess,
1632  _In_ UCHAR MajorFunction,
1634  _In_ ULONG IoControlCode,
1637 
1639 NTSTATUS
1640 NTAPI
1643  _In_ ULONG Length,
1644  _In_ BOOLEAN SetOperation);
1645 
1647 NTSTATUS
1648 NTAPI
1651  _In_ ULONG Length,
1652  _In_ BOOLEAN SetOperation);
1653 
1655 NTSTATUS
1656 NTAPI
1658  _In_ PFILE_QUOTA_INFORMATION QuotaBuffer,
1659  _In_ ULONG QuotaLength,
1660  _Out_ PULONG ErrorOffset);
1661 
1664 NTAPI
1666  _In_opt_ PFILE_OBJECT FileObject,
1667  _In_opt_ PDEVICE_OBJECT DeviceObject);
1668 
1671 NTAPI
1673  _In_opt_ PFILE_OBJECT FileObject,
1674  _In_opt_ PDEVICE_OBJECT DeviceObject);
1675 
1677 BOOLEAN
1678 NTAPI
1680  _In_ POBJECT_ATTRIBUTES ObjectAttributes,
1681  _In_ ACCESS_MASK DesiredAccess,
1685 
1687 NTSTATUS
1688 NTAPI
1689 IoPageRead(
1690  _In_ PFILE_OBJECT FileObject,
1691  _In_ PMDL Mdl,
1693  _In_ PKEVENT Event,
1694  _Out_ PIO_STATUS_BLOCK IoStatusBlock);
1695 
1698 NTAPI
1700  _In_ PFILE_OBJECT FileObject);
1701 
1705 NTAPI
1707 
1709 ULONG
1710 NTAPI
1712  _In_ PIRP Irp);
1713 
1715 PEPROCESS
1716 NTAPI
1718  _In_ PIRP Irp);
1719 
1721 PIRP
1722 NTAPI
1723 IoGetTopLevelIrp(VOID);
1724 
1726 BOOLEAN
1727 NTAPI
1729  _In_ PIRP Irp);
1730 
1732 BOOLEAN
1733 NTAPI
1735  _In_ PETHREAD Thread);
1736 
1738 BOOLEAN
1739 NTAPI
1741  _In_ PIRP Irp,
1742  _In_ PREPARSE_DATA_BUFFER ReparseBuffer);
1743 
1745 NTSTATUS
1746 NTAPI
1748  _In_ PFILE_OBJECT FileObject,
1749  _In_ FILE_INFORMATION_CLASS FileInformationClass,
1750  _In_ ULONG Length,
1753 
1755 NTSTATUS
1756 NTAPI
1758  _In_ PFILE_OBJECT FileObject,
1759  _In_ FS_INFORMATION_CLASS FsInformationClass,
1760  _In_ ULONG Length,
1761  _Out_ PVOID FsInformation,
1762  _Out_ PULONG ReturnedLength);
1763 
1765 VOID
1766 NTAPI
1768  _In_ PIRP Irp);
1769 
1771 VOID
1772 NTAPI
1774  _In_ __drv_aliasesMem PDEVICE_OBJECT DeviceObject);
1775 
1777 NTSTATUS
1778 NTAPI
1780  _In_ PDRIVER_OBJECT DriverObject,
1782 
1784 VOID
1785 NTAPI
1787  _In_ KIRQL Irql);
1788 
1790 VOID
1791 NTAPI
1793  _In_ PETHREAD Thread,
1794  _In_opt_ PDEVICE_OBJECT DeviceObject);
1795 
1797 NTSTATUS
1798 NTAPI
1800  _In_ PFILE_OBJECT FileObject,
1801  _In_ FILE_INFORMATION_CLASS FileInformationClass,
1802  _In_ ULONG Length,
1803  _In_ PVOID FileInformation);
1804 
1806 VOID
1807 NTAPI
1809  _In_opt_ PIRP Irp);
1810 
1812 NTSTATUS
1813 NTAPI
1815  _In_ PFILE_OBJECT FileObject,
1816  _In_ PMDL Mdl,
1818  _In_ PKEVENT Event,
1819  _Out_ PIO_STATUS_BLOCK IoStatusBlock);
1820 
1822 PEPROCESS
1823 NTAPI
1825  _In_ PETHREAD Thread);
1826 
1828 VOID
1829 NTAPI
1831  _In_ PDEVICE_OBJECT DeviceObject);
1832 
1834 VOID
1835 NTAPI
1837  _In_ PDRIVER_OBJECT DriverObject,
1838  _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine);
1839 
1841 NTSTATUS
1842 NTAPI
1844  _In_ PDEVICE_OBJECT DeviceObject,
1845  _In_ BOOLEAN AllowRawMount);
1846 
1848 NTSTATUS
1849 NTAPI
1851  _In_ PIRP Irp,
1852  _Out_ PULONG pSessionId);
1853 $endif (_NTIFS_)
1854 
1855 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
1856 
1857 $if (_NTDDK_)
1858 #if (NTDDI_VERSION >= NTDDI_WIN2KSP3)
1859 
1861 BOOLEAN
1862 NTAPI
1864  _In_ PFILE_OBJECT FileObject);
1865 
1867 NTSTATUS
1868 NTAPI
1870  _In_ PFILE_OBJECT FileObject,
1871  _In_ BOOLEAN Remote);
1872 
1873 #endif /* (NTDDI_VERSION >= NTDDI_WIN2KSP3) */
1874 $endif (_NTDDK_)
1875 
1876 #if (NTDDI_VERSION >= NTDDI_WINXP)
1877 
1878 $if (_WDMDDK_)
1880 NTSTATUS
1881 NTAPI
1883  _Out_ PIO_CSQ Csq,
1890 
1892 VOID
1893 NTAPI
1895  _Inout_ PIO_CSQ Csq,
1896  _Inout_ PIRP Irp,
1897  _Out_opt_ PIO_CSQ_IRP_CONTEXT Context);
1898 
1900 PIRP
1901 NTAPI
1903  _Inout_ PIO_CSQ Csq,
1904  _Inout_ PIO_CSQ_IRP_CONTEXT Context);
1905 
1907 PIRP
1908 NTAPI
1910  _Inout_ PIO_CSQ Csq,
1912 
1914 BOOLEAN
1915 NTAPI
1917  _In_ PDEVICE_OBJECT DeviceObject,
1918  _In_ PIRP Irp);
1919 
1920 #define IoForwardAndCatchIrp IoForwardIrpSynchronously
1921 
1923 VOID
1924 NTAPI
1926  _In_ PVOID ElEntry);
1927 
1931 NTSTATUS
1932 NTAPI
1934  _In_ PDEVICE_OBJECT DeviceObject,
1935  _In_ PIRP Irp,
1937  _In_opt_ PVOID Context,
1941 
1942 VOID
1943 NTAPI
1945  _In_ PDEVICE_OBJECT DeviceObject,
1946  _In_ BOOLEAN DeferredStartIo,
1947  _In_ BOOLEAN NonCancelable);
1948 
1950 NTSTATUS
1951 NTAPI
1953  _In_ PVOID DataBlockObject,
1954  _In_ PDEVICE_OBJECT DeviceObject,
1956 
1958 NTSTATUS
1959 NTAPI
1961  _In_ PVOID DataBlockObject,
1962  _In_ PUNICODE_STRING InstanceName,
1966  _Inout_updates_bytes_to_opt_(*OutBufferSize, InBufferSize) PUCHAR InOutBuffer);
1967 
1969 NTSTATUS
1970 NTAPI
1972  _In_ PVOID DataBlockObject,
1973  _In_ HANDLE FileHandle,
1974  _Out_ PUNICODE_STRING InstanceName);
1975 
1977 NTSTATUS
1978 NTAPI
1980  _In_ LPCGUID DataBlockGuid,
1981  _In_ ULONG DesiredAccess,
1982  _Out_ PVOID *DataBlockObject);
1983 
1985 NTSTATUS
1986 NTAPI
1988  _In_ PVOID DataBlockObject,
1989  _Inout_ ULONG *InOutBufferSize,
1990  _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer);
1991 
1993 NTSTATUS
1994 NTAPI
1996  _In_reads_(ObjectCount) PVOID *DataBlockObjectList,
1997  _In_ ULONG ObjectCount,
1998  _Inout_ ULONG *InOutBufferSize,
1999  _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer);
2000 
2002 NTSTATUS
2003 NTAPI
2005  _In_ PVOID DataBlockObject,
2006  _In_ PUNICODE_STRING InstanceName,
2007  _Inout_ ULONG *InOutBufferSize,
2008  _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer);
2009 
2011 NTSTATUS
2012 NTAPI
2016  _In_opt_ PVOID Context);
2017 
2019 NTSTATUS
2020 NTAPI
2022  _In_ PVOID DataBlockObject,
2023  _In_ PUNICODE_STRING InstanceName,
2024  _In_ ULONG Version,
2025  _In_ ULONG ValueBufferSize,
2026  _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer);
2027 
2029 NTSTATUS
2030 NTAPI
2032  _In_ PVOID DataBlockObject,
2033  _In_ PUNICODE_STRING InstanceName,
2035  _In_ ULONG Version,
2036  _In_ ULONG ValueBufferSize,
2037  _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer);
2038 $endif (_WDMDDK_)
2039 $if (_NTDDK_)
2042 NTSTATUS
2043 FASTCALL
2045  _In_ PDEVICE_OBJECT DeviceObject,
2049 
2052 NTSTATUS
2053 FASTCALL
2055  _In_ PDEVICE_OBJECT DeviceObject,
2056  _In_ ULONG SectorSize,
2059 
2062 NTSTATUS
2063 FASTCALL
2065  _In_ PDEVICE_OBJECT DeviceObject,
2066  _In_ ULONG SectorSize,
2069  _In_ struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
2070 
2072 NTSTATUS
2073 NTAPI
2074 IoCreateDisk(
2075  _In_ PDEVICE_OBJECT DeviceObject,
2076  _In_opt_ struct _CREATE_DISK* Disk);
2077 
2079 NTSTATUS
2080 NTAPI
2082  _In_ PDEVICE_OBJECT DeviceObject,
2083  _In_ ULONG BytesPerSector,
2085 
2088 NTSTATUS
2089 NTAPI
2091  _In_ PDEVICE_OBJECT DeviceObject,
2092  _Out_ struct _DRIVE_LAYOUT_INFORMATION_EX **PartitionBuffer);
2093 
2096 NTSTATUS
2097 NTAPI
2099  _In_ PDEVICE_OBJECT DeviceObject,
2100  _In_ ULONG PartitionNumber,
2102 
2104 NTSTATUS
2105 NTAPI
2107  _In_ PUNICODE_STRING VolumeNameString);
2108 
2110 NTSTATUS
2111 NTAPI
2113  _In_ PDEVICE_OBJECT DeviceObject,
2115 
2117 NTSTATUS
2118 NTAPI
2120  _In_ PVOID VolumeDeviceObject,
2121  _Out_ _When_(return==0,
2122  _At_(DosName->Buffer, __drv_allocatesMem(Mem)))
2124 
2127 NTSTATUS
2128 NTAPI
2130  _In_ PDEVICE_OBJECT DeviceObject,
2131  _In_reads_(_Inexpressible_(FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION_EX, PartitionEntry[0])))
2132  struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout);
2133 
2135 NTSTATUS
2136 NTAPI
2138  _Out_ PHANDLE FileHandle,
2139  _In_ ACCESS_MASK DesiredAccess,
2140  _In_ POBJECT_ATTRIBUTES ObjectAttributes,
2141  _Out_ PIO_STATUS_BLOCK IoStatusBlock,
2142  _In_opt_ PLARGE_INTEGER AllocationSize,
2143  _In_ ULONG FileAttributes,
2144  _In_ ULONG ShareAccess,
2145  _In_ ULONG Disposition,
2146  _In_ ULONG CreateOptions,
2147  _In_opt_ PVOID EaBuffer,
2148  _In_ ULONG EaLength,
2149  _In_ CREATE_FILE_TYPE CreateFileType,
2150  _In_opt_ PVOID InternalParameters,
2151  _In_ ULONG Options,
2152  _In_opt_ PVOID DeviceObject);
2153 
2155 NTSTATUS
2156 NTAPI
2158  _In_ PDEVICE_OBJECT SourceDevice,
2159  _In_ PDEVICE_OBJECT TargetDevice,
2160  _Outptr_ PDEVICE_OBJECT *AttachedToDeviceObject);
2161 
2162 $endif (_NTDDK_)
2163 $if (_NTIFS_)
2164 
2167 NTAPI
2169  _In_opt_ PFILE_OBJECT FileObject,
2170  _In_opt_ PDEVICE_OBJECT DeviceObject,
2172 
2174 NTSTATUS
2175 NTAPI
2177  _In_ PFILE_OBJECT FileObject,
2179 
2181 NTSTATUS
2182 NTAPI
2184  _In_ PDRIVER_OBJECT DriverObject,
2185  _Out_writes_bytes_to_opt_(DeviceObjectListSize,(*ActualNumberDeviceObjects)*sizeof(PDEVICE_OBJECT))
2186  PDEVICE_OBJECT *DeviceObjectList,
2187  _In_ ULONG DeviceObjectListSize,
2188  _Out_ PULONG ActualNumberDeviceObjects);
2189 
2192 NTAPI
2194  _In_ PDEVICE_OBJECT DeviceObject);
2195 
2198 NTAPI
2200  _In_ PDEVICE_OBJECT DeviceObject);
2201 
2203 NTSTATUS
2204 NTAPI
2206  _In_ PDEVICE_OBJECT FileSystemDeviceObject,
2208 $endif (_NTIFS_)
2209 
2210 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
2211 
2212 $if (_WDMDDK_)
2213 #if (NTDDI_VERSION >= NTDDI_WINXPSP1)
2215 NTSTATUS
2216 NTAPI
2218  _In_ PIRP Irp,
2220 #endif
2221 
2222 $endif (_WDMDDK_)
2223 $if (_WDMDDK_ || _NTDDK_)
2224 #if (NTDDI_VERSION >= NTDDI_WS03)
2225 $endif (_WDMDDK_ || _NTDDK_)
2226 $if (_NTDDK_)
2229 FASTCALL
2231  _In_ PIRP Irp);
2232 
2233 $endif (_NTDDK_)
2234 $if (_WDMDDK_)
2236 NTSTATUS
2237 NTAPI
2239  _Out_ PIO_CSQ Csq,
2240  _In_ PIO_CSQ_INSERT_IRP_EX CsqInsertIrp,
2241  _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp,
2242  _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp,
2243  _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock,
2244  _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock,
2245  _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp);
2246 
2248 NTSTATUS
2249 NTAPI
2251  _Inout_ PIO_CSQ Csq,
2252  _Inout_ PIRP Irp,
2255 $endif (_WDMDDK_)
2256 $if (_WDMDDK_ || _NTDDK_)
2257 #endif /* (NTDDI_VERSION >= NTDDI_WS03) */
2258 $endif (_WDMDDK_ || _NTDDK_)
2259 $if (_NTDDK_ || _NTIFS_)
2260 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
2261 $endif (_NTDDK_ || _NTIFS_)
2262 
2263 $if (_NTDDK_)
2264 BOOLEAN
2265 NTAPI
2268  _In_ ULONG BusNumber,
2272 $endif (_NTDDK_)
2273 $if (_NTIFS_)
2274 
2276 NTSTATUS
2277 NTAPI
2280  PDRIVER_OBJECT *DriverObjectList,
2281  _In_ ULONG DriverObjectListSize,
2283 $endif (_NTIFS_)
2284 $if (_NTDDK_ || _NTIFS_)
2285 #endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
2286 $endif (_NTDDK_ || _NTIFS_)
2287 
2288 #if (NTDDI_VERSION >= NTDDI_VISTA)
2289 $if (_WDMDDK_)
2291 NTSTATUS
2292 NTAPI
2293 IoGetBootDiskInformationLite(
2294  _Outptr_ PBOOTDISK_INFORMATION_LITE *BootDiskInformation);
2295 
2297 NTSTATUS
2298 NTAPI
2300  _In_ ACCESS_MASK DesiredAccess,
2301  _In_ ULONG DesiredShareAccess,
2302  _Inout_ PFILE_OBJECT FileObject,
2303  _Inout_ PSHARE_ACCESS ShareAccess,
2304  _In_ BOOLEAN Update,
2305  _In_ PBOOLEAN WritePermission);
2306 
2308 NTSTATUS
2309 NTAPI
2312 
2314 VOID
2315 NTAPI
2318 
2319 LOGICAL
2320 NTAPI
2322  _In_ ULONG_PTR RegionStart,
2324 
2326 VOID
2327 NTAPI
2329  _In_ ACCESS_MASK DesiredAccess,
2330  _In_ ULONG DesiredShareAccess,
2331  _Inout_ PFILE_OBJECT FileObject,
2332  _Out_ PSHARE_ACCESS ShareAccess,
2333  _In_ PBOOLEAN WritePermission);
2334 
2335 ULONG
2336 NTAPI
2337 IoSizeofWorkItem(VOID);
2338 
2339 VOID
2340 NTAPI
2342  _In_ PVOID IoObject,
2343  _Out_ PIO_WORKITEM IoWorkItem);
2344 
2345 VOID
2346 NTAPI
2348  _Inout_ PIO_WORKITEM IoWorkItem);
2349 
2351 VOID
2352 NTAPI
2353 IoQueueWorkItemEx(
2354  _Inout_ PIO_WORKITEM IoWorkItem,
2355  _In_ PIO_WORKITEM_ROUTINE_EX WorkerRoutine,
2356  _In_ WORK_QUEUE_TYPE QueueType,
2357  _In_opt_ __drv_aliasesMem PVOID Context);
2358 
2360 NTAPI
2362  _In_ PIRP Irp);
2363 
2364 NTSTATUS
2365 NTAPI
2367  _In_ PIRP Irp,
2369 
2370 NTSTATUS
2371 NTAPI
2373  _In_ PFILE_OBJECT FileObject,
2374  _In_ ULONG Length,
2375  _In_ PVOID Signature,
2376  _Out_ PVOID *StreamIdentifier);
2377 
2378 PVOID
2379 NTAPI
2381  _In_ PFILE_OBJECT FileObject,
2382  _In_ PVOID Signature);
2383 
2384 NTSTATUS
2385 NTAPI
2387  _In_ PFILE_OBJECT FileObject,
2388  _In_ PVOID Signature);
2389 
2393 NTSTATUS
2394 NTAPI
2395 IoRequestDeviceEjectEx(
2396  _In_ PDEVICE_OBJECT PhysicalDeviceObject,
2398  _In_opt_ PVOID Context,
2399  _In_opt_ PDRIVER_OBJECT DriverObject);
2400 
2404 NTSTATUS
2405 NTAPI
2406 IoSetDevicePropertyData(
2409  _In_ LCID Lcid,
2410  _In_ ULONG Flags,
2411  _In_ DEVPROPTYPE Type,
2412  _In_ ULONG Size,
2413  _In_opt_ PVOID Data);
2414 
2418 NTSTATUS
2419 NTAPI
2420 IoGetDevicePropertyData(
2421  _In_ PDEVICE_OBJECT Pdo,
2422  _In_ CONST DEVPROPKEY *PropertyKey,
2423  _In_ LCID Lcid,
2424  _Reserved_ ULONG Flags,
2425  _In_ ULONG Size,
2426  _Out_ PVOID Data,
2428  _Out_ PDEVPROPTYPE Type);
2429 
2430 $endif (_WDMDDK_)
2431 $if (_NTDDK_)
2433 NTSTATUS
2434 NTAPI
2435 IoUpdateDiskGeometry(
2436  _In_ PDEVICE_OBJECT DeviceObject,
2439 
2441 NTAPI
2443  _In_ PFILE_OBJECT FileObject);
2444 
2446 NTSTATUS
2447 NTAPI
2449  _Out_ PHANDLE FileHandle,
2450  _In_ ACCESS_MASK DesiredAccess,
2451  _In_ POBJECT_ATTRIBUTES ObjectAttributes,
2452  _Out_ PIO_STATUS_BLOCK IoStatusBlock,
2453  _In_opt_ PLARGE_INTEGER AllocationSize,
2454  _In_ ULONG FileAttributes,
2455  _In_ ULONG ShareAccess,
2456  _In_ ULONG Disposition,
2457  _In_ ULONG CreateOptions,
2458  _In_opt_ PVOID EaBuffer,
2459  _In_ ULONG EaLength,
2460  _In_ CREATE_FILE_TYPE CreateFileType,
2461  _In_opt_ PVOID InternalParameters,
2462  _In_ ULONG Options,
2464 
2465 NTSTATUS
2466 NTAPI
2468  _Inout_ PIRP Irp,
2469  _In_ struct _ECP_LIST *ExtraCreateParameter);
2470 
2471 VOID
2472 NTAPI
2474  _Inout_ PIRP Irp);
2475 
2476 NTSTATUS
2477 NTAPI
2479  _In_ PIRP Irp,
2480  _Outptr_result_maybenull_ struct _ECP_LIST **ExtraCreateParameter);
2481 
2482 BOOLEAN
2483 NTAPI
2485  _In_ PFILE_OBJECT FileObject);
2486 
2488 $if (_NTIFS_)
2489 
2491 VOID
2492 NTAPI
2493 IoInitializePriorityInfo(
2495 {
2496  PriorityInfo->Size = sizeof(IO_PRIORITY_INFO);
2497  PriorityInfo->ThreadPriority = 0xffff;
2498  PriorityInfo->IoPriority = IoPriorityNormal;
2499  PriorityInfo->PagePriority = 0;
2500 }
2501 $endif (_NTIFS_)
2502 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
2503 
2504 $if (_WDMDDK_)
2505 #define IoCallDriverStackSafeDefault(a, b) IoCallDriver(a, b)
2506 
2507 #if (NTDDI_VERSION >= NTDDI_WS08)
2511 NTSTATUS
2512 NTAPI
2513 IoReplacePartitionUnit(
2514  _In_ PDEVICE_OBJECT TargetPdo,
2516  _In_ ULONG Flags);
2517 #endif
2518 
2519 $endif (_WDMDDK_)
2520 #if (NTDDI_VERSION >= NTDDI_WIN7)
2521 
2522 $if (_WDMDDK_)
2524 NTSTATUS
2525 NTAPI
2526 IoGetAffinityInterrupt(
2527  _In_ PKINTERRUPT InterruptObject,
2529 
2530 NTSTATUS
2531 NTAPI
2534  _In_opt_ PVOID ContainerObject,
2535  _Inout_updates_bytes_opt_(BufferLength) PVOID Buffer,
2536  _In_ ULONG BufferLength);
2537 
2538 NTSTATUS
2539 NTAPI
2541  _In_ IO_CONTAINER_NOTIFICATION_CLASS NotificationClass,
2543  _In_reads_bytes_opt_(NotificationInformationLength) PVOID NotificationInformation,
2544  _In_ ULONG NotificationInformationLength,
2545  _Out_ PVOID CallbackRegistration);
2546 
2547 VOID
2548 NTAPI
2550  _In_ PVOID CallbackRegistration);
2551 
2555 NTSTATUS
2556 NTAPI
2557 IoUnregisterPlugPlayNotificationEx(
2558  _In_ PVOID NotificationEntry);
2559 
2563 NTSTATUS
2564 NTAPI
2565 IoGetDeviceNumaNode(
2568 
2569 $endif (_WDMDDK_)
2570 $if (_NTDDK_)
2571 NTSTATUS
2572 NTAPI
2573 IoSetFileObjectIgnoreSharing(
2574  _In_ PFILE_OBJECT FileObject);
2575 
2576 $endif (_NTDDK_)
2577 $if (_NTIFS_)
2578 
2580 NTSTATUS
2581 NTAPI
2582 IoRegisterFsRegistrationChangeMountAware(
2583  _In_ PDRIVER_OBJECT DriverObject,
2584  _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine,
2586 
2588 NTSTATUS
2589 NTAPI
2591  _In_ PFILE_OBJECT FileObject,
2592  _In_reads_bytes_(FileNameLength) PWSTR NewFileName,
2595 #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
2596 
2597 $if (_WDMDDK_)
2598 #if defined(_WIN64)
2600 ULONG
2601 NTAPI
2603  _In_ PDEVICE_OBJECT DeviceObject);
2604 #else
2605 #define IoWMIDeviceObjectToProviderId(DeviceObject) ((ULONG)(DeviceObject))
2606 #endif
2607 
2608 /*
2609  * USHORT
2610  * IoSizeOfIrp(
2611  * IN CCHAR StackSize)
2612  */
2613 #define IoSizeOfIrp(_StackSize) \
2614  ((USHORT) (sizeof(IRP) + ((_StackSize) * (sizeof(IO_STACK_LOCATION)))))
2615 
2617 VOID
2619  _Inout_ PIRP Irp)
2620 {
2621  ASSERT(Irp->CurrentLocation <= Irp->StackCount);
2622  Irp->CurrentLocation++;
2623 #ifdef NONAMELESSUNION
2624  Irp->Tail.Overlay.s.u.CurrentStackLocation++;
2625 #else
2626  Irp->Tail.Overlay.CurrentStackLocation++;
2627 #endif
2628 }
2629 
2631 VOID
2633  _Inout_ PIRP Irp)
2634 {
2635  ASSERT(Irp->CurrentLocation > 0);
2636  Irp->CurrentLocation--;
2637 #ifdef NONAMELESSUNION
2638  Irp->Tail.Overlay.s.u.CurrentStackLocation--;
2639 #else
2640  Irp->Tail.Overlay.CurrentStackLocation--;
2641 #endif
2642 }
2643 
2648  _In_ PIRP Irp)
2649 {
2650  ASSERT(Irp->CurrentLocation > 0);
2651 #ifdef NONAMELESSUNION
2652  return ((Irp)->Tail.Overlay.s.u.CurrentStackLocation - 1 );
2653 #else
2654  return ((Irp)->Tail.Overlay.CurrentStackLocation - 1 );
2655 #endif
2656 }
2657 
2660 VOID
2662  _In_ PIRP Irp,
2663  _In_opt_ PIO_COMPLETION_ROUTINE CompletionRoutine,
2665  _In_ BOOLEAN InvokeOnSuccess,
2666  _In_ BOOLEAN InvokeOnError,
2667  _In_ BOOLEAN InvokeOnCancel)
2668 {
2670  ASSERT( (InvokeOnSuccess || InvokeOnError || InvokeOnCancel) ? (CompletionRoutine != NULL) : TRUE );
2673  irpSp->Context = Context;
2674  irpSp->Control = 0;
2675 
2676  if (InvokeOnSuccess) {
2677  irpSp->Control = SL_INVOKE_ON_SUCCESS;
2678  }
2679 
2680  if (InvokeOnError) {
2681  irpSp->Control |= SL_INVOKE_ON_ERROR;
2682  }
2683 
2684  if (InvokeOnCancel) {
2685  irpSp->Control |= SL_INVOKE_ON_CANCEL;
2686  }
2687 }
2688 
2694  _Inout_ PIRP Irp,
2697  return (PDRIVER_CANCEL)(ULONG_PTR) InterlockedExchangePointer((PVOID *)&(Irp)->CancelRoutine, (PVOID)(ULONG_PTR)(CancelRoutine));
2698 }
2699 
2701 VOID
2703  _Inout_ PDEVICE_OBJECT DeviceObject,
2704  _In_opt_ PIRP Irp,
2706 {
2707  KeInsertQueueDpc(&DeviceObject->Dpc, Irp, Context);
2708 }
2709 
2710 /*
2711  * VOID
2712  * IoReleaseRemoveLock(
2713  * IN PIO_REMOVE_LOCK RemoveLock,
2714  * IN PVOID Tag)
2715  */
2716 #define IoReleaseRemoveLock(_RemoveLock, \
2717  _Tag) \
2718  IoReleaseRemoveLockEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
2719 
2720 /*
2721  * VOID
2722  * IoReleaseRemoveLockAndWait(
2723  * IN PIO_REMOVE_LOCK RemoveLock,
2724  * IN PVOID Tag)
2725  */
2726 #define IoReleaseRemoveLockAndWait(_RemoveLock, \
2727  _Tag) \
2728  IoReleaseRemoveLockAndWaitEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
2729 
2730 #if defined(_WIN64)
2733 BOOLEAN
2734 IoIs32bitProcess(
2735  _In_opt_ PIRP Irp);
2736 #endif
2737 
2738 #define PLUGPLAY_REGKEY_DEVICE 1
2739 #define PLUGPLAY_REGKEY_DRIVER 2
2740 #define PLUGPLAY_REGKEY_CURRENT_HWPROFILE 4
2741 
2746  _In_ PIRP Irp)
2747 {
2748  ASSERT(Irp->CurrentLocation <= Irp->StackCount + 1);
2749 #ifdef NONAMELESSUNION
2750  return Irp->Tail.Overlay.s.u.CurrentStackLocation;
2751 #else
2752  return Irp->Tail.Overlay.CurrentStackLocation;
2753 #endif
2754 }
2755 
2757 VOID
2759  _Inout_ PIRP Irp)
2760 {
2762 }
2763 
2764 /*
2765  * BOOLEAN
2766  * IoIsErrorUserInduced(
2767  * IN NTSTATUS Status);
2768  */
2769 #define IoIsErrorUserInduced(Status) \
2770  ((BOOLEAN)(((Status) == STATUS_DEVICE_NOT_READY) || \
2771  ((Status) == STATUS_IO_TIMEOUT) || \
2772  ((Status) == STATUS_MEDIA_WRITE_PROTECTED) || \
2773  ((Status) == STATUS_NO_MEDIA_IN_DEVICE) || \
2774  ((Status) == STATUS_VERIFY_REQUIRED) || \
2775  ((Status) == STATUS_UNRECOGNIZED_MEDIA) || \
2776  ((Status) == STATUS_WRONG_VOLUME)))
2777 
2778 /* VOID
2779  * IoInitializeRemoveLock(
2780  * IN PIO_REMOVE_LOCK Lock,
2781  * IN ULONG AllocateTag,
2782  * IN ULONG MaxLockedMinutes,
2783  * IN ULONG HighWatermark)
2784  */
2785 #define IoInitializeRemoveLock( \
2786  Lock, AllocateTag, MaxLockedMinutes, HighWatermark) \
2787  IoInitializeRemoveLockEx(Lock, AllocateTag, MaxLockedMinutes, \
2788  HighWatermark, sizeof(IO_REMOVE_LOCK))
2789 
2791 VOID
2793  _In_ PDEVICE_OBJECT DeviceObject,
2795 {
2796 #ifdef _MSC_VER
2797 #pragma warning(push)
2798 #pragma warning(disable:28024)
2799 #endif
2800  KeInitializeDpc(&DeviceObject->Dpc,
2801  (PKDEFERRED_ROUTINE) DpcRoutine,
2802  DeviceObject);
2803 #ifdef _MSC_VER
2804 #pragma warning(pop)
2805 #endif
2806 }
2807 
2808 #define DEVICE_INTERFACE_INCLUDE_NONACTIVE 0x00000001
2809 
2810 /*
2811  * ULONG
2812  * IoGetFunctionCodeFromCtlCode(
2813  * IN ULONG ControlCode)
2814  */
2815 #define IoGetFunctionCodeFromCtlCode(_ControlCode) \
2816  (((_ControlCode) >> 2) & 0x00000FFF)
2817 
2819 VOID
2821  _Inout_ PIRP Irp)
2822 {
2824  PIO_STACK_LOCATION nextIrpSp;
2825  irpSp = IoGetCurrentIrpStackLocation(Irp);
2826  nextIrpSp = IoGetNextIrpStackLocation(Irp);
2827  RtlCopyMemory(nextIrpSp, irpSp, FIELD_OFFSET(IO_STACK_LOCATION, CompletionRoutine));
2828  nextIrpSp->Control = 0;
2829 }
2830 
2833 VOID
2834 NTAPI
2836  _Out_ PULONG_PTR LowLimit,
2838 
2841 ULONG_PTR
2842 IoGetRemainingStackSize(VOID)
2843 {
2844  ULONG_PTR End, Begin;
2845  ULONG_PTR Result;
2846 
2847  IoGetStackLimits(&Begin, &End);
2848  Result = (ULONG_PTR)(&End) - Begin;
2849  return Result;
2850 }
2851 
2852 #if (NTDDI_VERSION >= NTDDI_WS03)
2854 VOID
2856  _In_ PDEVICE_OBJECT DeviceObject,
2858 {
2859 #ifdef _MSC_VER
2860 #pragma warning(push)
2861 #pragma warning(disable:28024)
2862 #pragma warning(disable:28128)
2863 #endif
2864  KeInitializeThreadedDpc(&DeviceObject->Dpc,
2865  (PKDEFERRED_ROUTINE) DpcRoutine,
2866  DeviceObject );
2867 #ifdef _MSC_VER
2868 #pragma warning(pop)
2869 #endif
2870 }
2871 #endif
2872 
2873 $endif (_WDMDDK_)
_In_ PIO_CSQ_INSERT_IRP CsqInsertIrp
Definition: iofuncs.h:1884
DWORD *typedef PVOID
Definition: winlogon.h:52
PGENERIC_MAPPING NTAPI IoGetFileObjectGenericMapping(VOID)
Definition: file.c:2871
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
_In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: iofuncs.h:1543
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2792
NTHALAPI ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN InvokeOnError
Definition: iofuncs.h:1935
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetBaseFileSystemDeviceObject(_In_ PFILE_OBJECT FileObject)
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1153
NTKERNELAPI NTSTATUS NTAPI IoReportResourceForDetection(_In_ PDRIVER_OBJECT DriverObject, _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList, _In_opt_ ULONG DriverListSize, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList, _In_opt_ ULONG DeviceListSize, _Out_ PBOOLEAN ConflictDetected)
_In_ CONST GUID * AliasInterfaceClassGuid
Definition: iofuncs.h:960
_In_ PVOID NotificationStructure
Definition: iofuncs.h:1203
NTSTATUS NTAPI IoUnregisterPlugPlayNotification(IN PVOID NotificationEntry)
Definition: pnpnotify.c:372
_Inout_ PMDL TargetMdl
Definition: iofuncs.h:728
NTKERNELAPI NTSTATUS NTAPI IoWMIQueryAllDataMultiple(_In_reads_(ObjectCount) PVOID *DataBlockObjectList, _In_ ULONG ObjectCount, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
_In_ PDRIVER_FS_NOTIFICATION _In_ BOOLEAN SynchronizeWithMounts
Definition: iofuncs.h:2584
FORCEINLINE VOID IoMarkIrpPending(_Inout_ PIRP Irp)
Definition: iofuncs.h:2758
CPPORT Port[4]
Definition: headless.c:34
VOID NTAPI DpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: fbtpnp.c:1298
#define IN
Definition: typedefs.h:38
_Out_ PULONG_PTR HighLimit
Definition: iofuncs.h:2837
NTKERNELAPI NTSTATUS NTAPI IoAssignResources(_In_ PUNICODE_STRING RegistryPath, _In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, _Inout_ PCM_RESOURCE_LIST *AllocatedResources)
PPC_QUAL void __inbytestring(unsigned long Port, unsigned char *Buffer, unsigned long Count)
Definition: intrin_ppc.h:584
NTSTATUS NTAPI IoValidateDeviceIoControlAccess(IN PIRP Irp, IN ULONG RequiredAccess)
Definition: util.c:268
DRIVER_CANCEL * PDRIVER_CANCEL
Definition: iotypes.h:2399
NTSTATUS(NTAPI * PALLOCATE_ADAPTER_CHANNEL)(_In_ PDMA_ADAPTER DmaAdapter, _In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG NumberOfMapRegisters, _In_ PDRIVER_CONTROL ExecutionRoutine, _In_ PVOID Context)
Definition: iotypes.h:2204
#define _Must_inspect_result_
Definition: no_sal2.h:314
_In_ __drv_reportError("MajorVersion must be 1 or 6")) UCHAR MajorVersion
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)
DRIVER_NOTIFICATION_CALLBACK_ROUTINE * PDRIVER_NOTIFICATION_CALLBACK_ROUTINE
Definition: iotypes.h:1203
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
#define _Requires_lock_not_held_(lock)
Definition: no_sal2.h:705
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:798
enum _IO_CONTAINER_INFORMATION_CLASS IO_CONTAINER_INFORMATION_CLASS
ULONG MinorVersion
Definition: ros_glue.cpp:5
NTKERNELAPI NTSTATUS NTAPI IoSetSystemPartition(_In_ PUNICODE_STRING VolumeNameString)
_In_opt_ PDEVICE_OBJECT _In_ ULONG _Outptr_result_nullonfailure_ _At_ * SymbolicLinkList(return==0, __drv_allocatesMem(Mem))) PZZWSTR *SymbolicLinkList
NTKERNELAPI VOID NTAPI IoRegisterFileSystem(_In_ __drv_aliasesMem PDEVICE_OBJECT DeviceObject)
_In_ IO_PRIORITY_HINT PriorityHint
Definition: fltkernel.h:2682
NTSTATUS NTAPI IoOpenDeviceInterfaceRegistryKey(IN PUNICODE_STRING SymbolicLinkName, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DeviceInterfaceKey)
Definition: deviface.c:245
#define DEVICE_TYPE
Definition: nt_native.h:578
enum _INTERFACE_TYPE INTERFACE_TYPE
ULONG MajorVersion
Definition: ros_glue.cpp:4
_In_ PDEVICE_OBJECT Pdo
Definition: classpnp.h:301
#define SL_PENDING_RETURNED
Definition: iotypes.h:2936
NTSTATUS NTAPI IoGetContainerInformation(_In_ IO_CONTAINER_INFORMATION_CLASS InformationClass, _In_opt_ PVOID ContainerObject, _Inout_updates_bytes_opt_(BufferLength) PVOID Buffer, _In_ ULONG BufferLength)
_Inout_ PMDL _In_ PVOID VirtualAddress
Definition: iofuncs.h:728
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
Type
Definition: Type.h:6
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject(_In_ PFILE_OBJECT FileObject)
NTKERNELAPI NTSTATUS NTAPI IoVolumeDeviceToDosName(_In_ PVOID VolumeDeviceObject, _Out_ _When_(return==0, _At_(DosName->Buffer, __drv_allocatesMem(Mem))) PUNICODE_STRING DosName)
NTKERNELAPI BOOLEAN NTAPI IoFastQueryNetworkAttributes(_In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG OpenOptions, _Out_ PIO_STATUS_BLOCK IoStatus, _Out_ PFILE_NETWORK_OPEN_INFORMATION Buffer)
_Must_inspect_result_ _In_ BOOLEAN ChargeQuota
Definition: iofuncs.h:649
_In_ CONST DEVPROPKEY _In_ LCID Lcid
Definition: iofuncs.h:2408
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG EaLength
Definition: iofuncs.h:652
NTKERNELAPI NTSTATUS NTAPI IoVerifyPartitionTable(_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN FixErrors)
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
Definition: irp.c:1894
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING _In_ UINT OpenOptions
Definition: ndis.h:5994
IO_PAGING_PRIORITY FASTCALL IoGetPagingIoPriority(IN PIRP Irp)
Definition: irp.c:1671
NTSTATUS(NTAPI * PIO_CONTAINER_NOTIFICATION_FUNCTION)(VOID)
Definition: iotypes.h:428
BOOLEAN Enable
Definition: acefiex.h:245
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
VOID NTAPI IoStartTimer(IN PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:133
NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObject(_In_opt_ PFILE_OBJECT FileObject, _In_opt_ PDEVICE_OBJECT DeviceObject)
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:688
_In_ PIO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE QueueType
Definition: iofuncs.h:1046
#define _Out_writes_bytes_to_opt_(size, count)
Definition: no_sal2.h:375
#define NTHALAPI
Definition: ntoskrnl.h:39
_In_ ULONG _In_opt_ PVOID EventCategoryData
Definition: iofuncs.h:1146
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:1006
NTKERNELAPI NTSTATUS NTAPI IoQueryFileDosDeviceName(_In_ PFILE_OBJECT FileObject, _Out_ POBJECT_NAME_INFORMATION *ObjectNameInformation)
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Definition: iorsrce.c:830
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
Definition: ndis.h:4621
NTKERNELAPI NTSTATUS NTAPI IoWMIQuerySingleInstance(_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
_In_ PIRP Irp
Definition: csq.h:116
IO_WORKITEM_ROUTINE * PIO_WORKITEM_ROUTINE
Definition: iotypes.h:482
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
IO_CSQ_REMOVE_IRP * PIO_CSQ_REMOVE_IRP
Definition: csq.h:135
$if(_WDMDDK_) NTHALAPI VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port
Definition: ke.h:1
_In_ PDRIVER_REINITIALIZE DriverReinitializationRoutine
Definition: iofuncs.h:1517
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN ShareVector
Definition: iofuncs.h:798
NTSTATUS NTAPI IoSetIoPriorityHint(_In_ PIRP Irp, _In_ IO_PRIORITY_HINT PriorityHint)
#define _IRQL_saves_
Definition: no_sal2.h:655
DeviceType
Definition: mmdrv.h:41
struct _IO_DRIVER_CREATE_CONTEXT IO_DRIVER_CREATE_CONTEXT
const char * PCSTR
Definition: typedefs.h:51
NTKERNELAPI VOID NTAPI IoSetTopLevelIrp(_In_opt_ PIRP Irp)
_In_ ULONG DevInstKeyType
Definition: iofuncs.h:1123
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2268
NTKERNELAPI NTSTATUS NTAPI IoCheckEaBufferValidity(_In_ PFILE_FULL_EA_INFORMATION EaBuffer, _In_ ULONG EaLength, _Out_ PULONG ErrorOffset)
PPC_QUAL void __outbytestring(unsigned long const Port, const unsigned char *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:653
unsigned char * PUCHAR
Definition: retypes.h:3
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID _In_ ULONG _In_ BOOLEAN InternalDeviceIoControl
Definition: iofuncs.h:713
#define _Ret_range_(lb, ub)
Definition: no_sal2.h:613
BOOLEAN NTAPI KeInsertQueueDpc(IN PKDPC Dpc, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dpc.c:724
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID EaBuffer
Definition: iofuncs.h:835
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG _In_ ULONG InputBufferLength
Definition: iofuncs.h:725
_In_ PDEVICE_OBJECT _In_ ULONG NumberOfMapRegisters
Definition: iofuncs.h:1393
ActualNumberDriverObjects _In_ ULONG DriverObjectListSize
Definition: iofuncs.h:2281
VOID NTAPI IoAcquireCancelSpinLock(OUT PKIRQL Irql)
Definition: util.c:29
#define _NTIFS_
Definition: ifssupp.h:20
#define _Outptr_
Definition: no_sal2.h:396
PVOID *typedef PWSTR
Definition: winlogon.h:57
$endif(_WDMDDK_) $if(_NTDDK_) FORCEINLINE VOID NTAPI IoInitializeDriverCreateContext(PIO_DRIVER_CREATE_CONTEXT DriverContext)
Definition: iofuncs.h:550
NTSTATUS NTAPI IoWMIAllocateInstanceIds(IN GUID *Guid, IN ULONG InstanceCount, OUT ULONG *FirstInstanceId)
Definition: wmi.c:82
NTKERNELAPI BOOLEAN NTAPI IoIsSystemThread(_In_ PETHREAD Thread)
IO_CSQ_ACQUIRE_LOCK * PIO_CSQ_ACQUIRE_LOCK
Definition: csq.h:180
NTKERNELAPI NTSTATUS NTAPI IoWMIDeviceObjectToInstanceName(_In_ PVOID DataBlockObject, _In_ PDEVICE_OBJECT DeviceObject, _Out_ PUNICODE_STRING InstanceName)
NTKERNELAPI NTSTATUS NTAPI IoCheckFunctionAccess(_In_ ACCESS_MASK GrantedAccess, _In_ UCHAR MajorFunction, _In_ UCHAR MinorFunction, _In_ ULONG IoControlCode, _In_opt_ PVOID Argument1, _In_opt_ PVOID Argument2)
NTHALAPI USHORT NTAPI READ_PORT_USHORT(IN PUSHORT Port)
Definition: portio.c:63
VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:26
static OUT PIO_STATUS_BLOCK OUT PVOID FileInformation
Definition: pipe.c:75
Irp Tail Overlay DriverContext[3]
VOID NTAPI IoAcquireVpbSpinLock(OUT PKIRQL Irql)
Definition: volume.c:1201
NTSTATUS NTAPI IoAllocateSfioStreamIdentifier(_In_ PFILE_OBJECT FileObject, _In_ ULONG Length, _In_ PVOID Signature, _Out_ PVOID *StreamIdentifier)
NTKERNELAPI NTSTATUS NTAPI IoWMIHandleToInstanceName(_In_ PVOID DataBlockObject, _In_ HANDLE FileHandle, _Out_ PUNICODE_STRING InstanceName)
#define _WDMDDK_
Definition: wdm.template.h:26
NTKERNELAPI NTSTATUS NTAPI IoQueryVolumeInformation(_In_ PFILE_OBJECT FileObject, _In_ FS_INFORMATION_CLASS FsInformationClass, _In_ ULONG Length, _Out_ PVOID FsInformation, _Out_ PULONG ReturnedLength)
NTSTATUS NTAPI IoGetDeviceInterfaces(IN CONST GUID *InterfaceClassGuid, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, IN ULONG Flags, OUT PWSTR *SymbolicLinkList)
Definition: deviface.c:458
PPC_QUAL unsigned long __indword(const unsigned long Port)
Definition: intrin_ppc.h:569
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:1070
_In_opt_ PVOID _In_ PIO_WORKITEM IoWorkItem
Definition: iotypes.h:487
#define _Post_notnull_
Definition: no_sal2.h:460
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1209
LOGICAL NTAPI IoWithinStackLimits(_In_ ULONG_PTR RegionStart, _In_ SIZE_T RegionSize)
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)
PPC_QUAL void __outbyte(unsigned long const Port, const unsigned char Data)
Definition: intrin_ppc.h:605
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT SourceDevice
Definition: iofuncs.h:688
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
DWORD LCID
Definition: nls.h:13
_In_ ULONG EventCategoryFlags
Definition: iofuncs.h:1146
BOOLEAN NTAPI IoIsFileObjectIgnoringSharing(_In_ PFILE_OBJECT FileObject)
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_opt_(dwBufLen,*pdwDataLen) BYTE *pbData
PDEVICE_OBJECT NTAPI IoGetDeviceToVerify(IN PETHREAD Thread)
Definition: util.c:304
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock
Definition: iofuncs.h:1884
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
enum _INTERFACE_TYPE * PINTERFACE_TYPE
IN OUT PULONG IN OUT PUNICODE_STRING InstanceName
Definition: wmilib.h:28
NTSTATUS NTAPI IoReadPartitionTableEx(IN PDEVICE_OBJECT DeviceObject, IN struct _DRIVE_LAYOUT_INFORMATION_EX **DriveLayout)
Definition: fstubex.c:2247
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
Definition: iofuncs.h:2066
VOID NTAPI IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock, IN PVOID Tag, IN ULONG RemlockSize)
Definition: remlock.c:243
ULONG * PDEVPROPTYPE
Definition: devpropdef.h:24
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
VOID NTAPI IoInitializeRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN ULONG AllocateTag, IN ULONG MaxLockedMinutes, IN ULONG HighWatermark, IN ULONG RemlockSize)
Definition: remlock.c:33
_NullNull_terminated_ WCHAR * PZZWSTR
Definition: ntbasedef.h:419
_In_ CONST GUID _Out_ _When_(return==0, _At_(AliasSymbolicLinkName->Buffer, __drv_allocatesMem(Mem))) PUNICODE_STRING AliasSymbolicLinkName)
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)
_In_ ULONG _In_ ULONG PartitionNumber
Definition: iofuncs.h:2056
ULONG DEVPROPTYPE
Definition: devpropdef.h:24
IoSetCancelRoutine(Irp, CancelRoutine)
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
PVOID PMDL
Definition: usb.h:39
_In_ UCHAR EntrySize
Definition: iofuncs.h:640
#define FASTCALL
Definition: nt_native.h:50
VOID NTAPI IoInitializeIrp(IN PIRP Irp, IN USHORT PacketSize, IN CCHAR StackSize)
Definition: irp.c:1777
_Out_ PKIRQL Irql
Definition: csq.h:179
VOID NTAPI IoFreeMapRegisters(IN PADAPTER_OBJECT AdapterObject, IN PVOID MapRegisterBase, IN ULONG NumberOfMapRegisters)
Definition: dma.c:114
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
VOID NTAPI IoWriteErrorLogEntry(IN PVOID ElEntry)
Definition: error.c:620
NTHALAPI VOID NTAPI READ_PORT_BUFFER_ULONG(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
_In_ ULONG _Out_ ULONG * FirstInstanceId
Definition: iofuncs.h:1319
_In_ PCALLBACK_FUNCTION CallbackFunction
Definition: exfuncs.h:826
VOID NTAPI IoRemoveShareAccess(IN PFILE_OBJECT FileObject, IN PSHARE_ACCESS ShareAccess)
Definition: file.c:3082
_In_ ACCESS_MASK _Out_ PHANDLE DeviceInterfaceKey
Definition: iofuncs.h:1113
enum _IO_NOTIFICATION_EVENT_CATEGORY IO_NOTIFICATION_EVENT_CATEGORY
PPC_QUAL void __outdwordstring(unsigned long const Port, const unsigned long *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:671
_In_ ULONG SectorSize
Definition: iofuncs.h:2046
_In_ struct _DISK_GEOMETRY_EX * OldDiskGeometry
Definition: iofuncs.h:2437
_In_ ACCESS_MASK DesiredAccess
Definition: iofuncs.h:642
#define _In_opt_
Definition: no_sal2.h:213
NTKERNELAPI BOOLEAN NTAPI IoIsValidNameGraftingBuffer(_In_ PIRP Irp, _In_ PREPARSE_DATA_BUFFER ReparseBuffer)
NTKERNELAPI VOID NTAPI IoUnregisterFsRegistrationChange(_In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine)
_In_opt_ PUNICODE_STRING DriverClassName
Definition: halfuncs.h:156
_In_reads_(_Inexpressible_(FIELD_OFFSET(DRIVE_LAYOUT_INFORMATION_EX, PartitionEntry[0]))) struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout)
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG _In_ ULONG _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer
VOID NTAPI IoRegisterDriverReinitialization(IN PDRIVER_OBJECT DriverObject, IN PDRIVER_REINITIALIZE ReinitRoutine, IN PVOID Context)
Definition: driver.c:1676
KSERVICE_ROUTINE * PKSERVICE_ROUTINE
Definition: ketypes.h:485
NTKERNELAPI NTSTATUS NTAPI IoCreateFileEx(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_opt_ PLARGE_INTEGER AllocationSize, _In_ ULONG FileAttributes, _In_ ULONG ShareAccess, _In_ ULONG Disposition, _In_ ULONG CreateOptions, _In_opt_ PVOID EaBuffer, _In_ ULONG EaLength, _In_ CREATE_FILE_TYPE CreateFileType, _In_opt_ PVOID InternalParameters, _In_ ULONG Options, _In_opt_ PIO_DRIVER_CREATE_CONTEXT DriverContext)
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:515
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE CreateFileType
Definition: iofuncs.h:835
uint32_t ULONG_PTR
Definition: typedefs.h:63
NTKERNELAPI NTSTATUS NTAPI IoWMISetSingleItem(_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG DataItemId, _In_ ULONG Version, _In_ ULONG ValueBufferSize, _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer)
_Out_ PUSHORT NodeNumber
Definition: iofuncs.h:2567
NTSTATUS NTAPI IoEnumerateRegisteredFiltersList(OUT PDRIVER_OBJECT *DriverObjectList, IN ULONG DriverObjectListSize, OUT PULONG ActualNumberDriverObjects)
Definition: volume.c:818
IN OUT PIRP IN ULONG IN ULONG IN ULONG IN ULONG IN ULONG OutBufferSize
Definition: wmilib.h:56
VOID NTAPI KeInitializeThreadedDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:698
#define _Post_
Definition: no_sal2.h:446
_In_ ULONG _In_ BOOLEAN _In_ BOOLEAN _Inout_opt_ PIRP Irp
Definition: iofuncs.h:657
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_UCHAR(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
NTKERNELAPI VOID NTAPI IoSetDeviceToVerify(_In_ PETHREAD Thread, _In_opt_ PDEVICE_OBJECT DeviceObject)
FORCEINLINE VOID IoCopyCurrentIrpStackLocationToNext(_Inout_ PIRP Irp)
Definition: iofuncs.h:2820
UCHAR KIRQL
Definition: env_spec_w32.h:591
NTKERNELAPI NTSTATUS NTAPI IoWMISetNotificationCallback(_Inout_ PVOID Object, _In_ WMI_NOTIFICATION_CALLBACK Callback, _In_opt_ PVOID Context)
VOID NTAPI IoBuildPartialMdl(IN PMDL SourceMdl, IN PMDL TargetMdl, IN PVOID VirtualAddress, IN ULONG Length)
Definition: iomdl.c:96
NTKERNELAPI NTSTATUS NTAPI IoPageRead(_In_ PFILE_OBJECT FileObject, _In_ PMDL Mdl, _In_ PLARGE_INTEGER Offset, _In_ PKEVENT Event, _Out_ PIO_STATUS_BLOCK IoStatusBlock)
NTSTATUS NTAPI IoSetIrpExtraCreateParameter(_Inout_ PIRP Irp, _In_ struct _ECP_LIST *ExtraCreateParameter)
NTKERNELAPI BOOLEAN NTAPI IoIsOperationSynchronous(_In_ PIRP Irp)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define _IRQL_requires_min_(irql)
Definition: no_sal2.h:651
NTHALAPI VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
Definition: portio.c:115
CHAR16 * String
Definition: acefiex.h:201
NTKERNELAPI VOID NTAPI IoReleaseRemoveLockEx(_Inout_ PIO_REMOVE_LOCK RemoveLock, _In_opt_ PVOID Tag, _In_ ULONG RemlockSize)
#define _Acquires_lock_(lock)
Definition: no_sal2.h:677
NTKERNELAPI NTSTATUS NTAPI IoCreateFileSpecifyDeviceObjectHint(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_opt_ PLARGE_INTEGER AllocationSize, _In_ ULONG FileAttributes, _In_ ULONG ShareAccess, _In_ ULONG Disposition, _In_ ULONG CreateOptions, _In_opt_ PVOID EaBuffer, _In_ ULONG EaLength, _In_ CREATE_FILE_TYPE CreateFileType, _In_opt_ PVOID InternalParameters, _In_ ULONG Options, _In_opt_ PVOID DeviceObject)
PTXN_PARAMETER_BLOCK NTAPI IoGetTransactionParameterBlock(_In_ PFILE_OBJECT FileObject)
NTSTATUS NTAPI IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject, IN INTERFACE_TYPE LegacyBusType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PCM_RESOURCE_LIST ResourceList, IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL, IN BOOLEAN ResourceAssigned, IN OUT PDEVICE_OBJECT *DeviceObject OPTIONAL)
Definition: pnpreport.c:162
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE _Inout_opt_ __drv_aliasesMem PVOID _Outptr_result_nullonfailure_ _At_ * NotificationEntry(return==0, __drv_allocatesMem(Mem))) PVOID *NotificationEntry
NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceToDeviceStackSafe(_In_ PDEVICE_OBJECT SourceDevice, _In_ PDEVICE_OBJECT TargetDevice, _Outptr_ PDEVICE_OBJECT *AttachedToDeviceObject)
NTHALAPI VOID NTAPI WRITE_PORT_UCHAR(IN PUCHAR Port, IN UCHAR Value)
Definition: portio.c:107
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG _In_ ULONG SectorsPerTrack
Definition: iofuncs.h:2066
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
PFILE_OBJECT NTAPI IoCreateStreamFileObjectEx(IN PFILE_OBJECT FileObject OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, OUT PHANDLE FileObjectHandle OPTIONAL)
Definition: file.c:2704
BOOLEAN NTAPI IoIsFileOriginRemote(IN PFILE_OBJECT FileObject)
Definition: file.c:2882
_In_opt_ PUNICODE_STRING _In_opt_ PKTHREAD Thread
Definition: iofuncs.h:1508
_In_ ULONG _In_ ULONG _In_ ULONG PartitionType
Definition: iofuncs.h:2056
NTSTATUS NTAPI IoGetDeviceInterfaceAlias(IN PUNICODE_STRING SymbolicLinkName, IN CONST GUID *AliasInterfaceClassGuid, OUT PUNICODE_STRING AliasSymbolicLinkName)
Definition: deviface.c:307
#define _NullNull_terminated_
Definition: no_sal2.h:321
_In_ PVOID _In_opt_ PDEVICE_CHANGE_COMPLETE_CALLBACK Callback
Definition: iofuncs.h:1211
NTKERNELAPI VOID NTAPI IoDisconnectInterruptEx(_In_ PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters)
long LONG
Definition: pedump.c:60
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG Disposition
Definition: iofuncs.h:835
NTSTATUS NTAPI IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, IN PKSERVICE_ROUTINE ServiceRoutine, IN PVOID ServiceContext, IN PKSPIN_LOCK SpinLock, IN ULONG Vector, IN KIRQL Irql, IN KIRQL SynchronizeIrql, IN KINTERRUPT_MODE InterruptMode, IN BOOLEAN ShareVector, IN KAFFINITY ProcessorEnableMask, IN BOOLEAN FloatingSave)
Definition: irq.c:22
NTKERNELAPI NTSTATUS NTAPI IoWMISetSingleInstance(_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG Version, _In_ ULONG ValueBufferSize, _In_reads_bytes_(ValueBufferSize) PVOID ValueBuffer)
_Kernel_clear_do_init_(__yes)) typedef NTSTATUS(NTAPI DRIVER_ADD_DEVICE)(_In_ struct _DRIVER_OBJECT *DriverObject
VOID NTAPI IoStopTimer(PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:166
VOID NTAPI IoClearIrpExtraCreateParameter(_Inout_ PIRP Irp)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE _In_opt_ PVOID InternalParameters
Definition: iofuncs.h:835
#define _Releases_lock_(a)
Definition: btrfs_drv.h:164
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:766
_Out_ PIO_STATUS_BLOCK _In_reads_bytes_(Length) PVOID FileInformation
_In_opt_ PDEVICE_OBJECT _Out_opt_ PHANDLE FileObjectHandle
Definition: iofuncs.h:2170
LONG ObjectCount
Definition: comsup.c:7
#define _Inout_updates_bytes_opt_(size)
Definition: no_sal2.h:290
_In_ CONST GUID _In_opt_ PUNICODE_STRING ReferenceString
Definition: iofuncs.h:1134
_In_ CCHAR PriorityBoost
Definition: iofuncs.h:763
#define __drv_aliasesMem
Definition: btrfs_drv.h:161
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
Definition: iofuncs.h:2048
_In_opt_ PDRIVER_CANCEL CancelRoutine
Definition: iofuncs.h:2696
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_ULONG(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetFileInformation(_In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _In_ BOOLEAN SetOperation)
VOID NTAPI IoStartPacket(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PULONG Key, IN PDRIVER_CANCEL CancelFunction)
Definition: device.c:1649
NTKERNELAPI NTSTATUS NTAPI IoAttachDevice(_In_ _Kernel_requires_resource_held_(Memory) _When_(return==0, __drv_aliasesMem) PDEVICE_OBJECT SourceDevice, _In_ PUNICODE_STRING TargetDevice, _Out_ PDEVICE_OBJECT *AttachedDevice)
IN OUT PIRP IN ULONG IN ULONG IN ULONG DataItemId
Definition: wmilib.h:76
NTKERNELAPI PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1766
smooth NULL
Definition: ftsmooth.c:557
VOID NTAPI IoAllocateController(IN PCONTROLLER_OBJECT ControllerObject, IN PDEVICE_OBJECT DeviceObject, IN PDRIVER_CONTROL ExecutionRoutine, IN PVOID Context)
Definition: controller.c:25
NTKERNELAPI VOID NTAPI IoSetShareAccessEx(_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Out_ PSHARE_ACCESS ShareAccess, _In_ PBOOLEAN WritePermission)
NTSTATUS NTAPI IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PVOID NotificationStructure)
Definition: pnpreport.c:416
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG IoControlCode
Definition: iofuncs.h:719
_Out_ PGROUP_AFFINITY GroupAffinity
Definition: iofuncs.h:2528
enum _KINTERRUPT_MODE KINTERRUPT_MODE
VOID NTAPI IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
Definition: irq.c:140
NTKERNELAPI NTSTATUS NTAPI IoSetInformation(_In_ PFILE_OBJECT FileObject, _In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _In_ PVOID FileInformation)
_In_ struct _DISK_GEOMETRY_EX _In_ struct _DISK_GEOMETRY_EX * NewDiskGeometry
Definition: iofuncs.h:2438
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL SynchronizeIrql
Definition: iofuncs.h:798
NTKERNELAPI NTSTATUS NTAPI IoQueryFileInformation(_In_ PFILE_OBJECT FileObject, _In_ FILE_INFORMATION_CLASS FileInformationClass, _In_ ULONG Length, _Out_ PVOID FileInformation, _Out_ PULONG ReturnedLength)
_In_ ULONG Action
Definition: iofuncs.h:1338
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG CreateOptions
Definition: iofuncs.h:642
#define FORCEINLINE
Definition: ntbasedef.h:213
#define _Out_
Definition: no_sal2.h:323
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN _In_ KAFFINITY ProcessorEnableMask
Definition: iofuncs.h:798
#define NTKERNELAPI
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:3897
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT DriverObject
Definition: iofuncs.h:1146
IO_CSQ_PEEK_NEXT_IRP * PIO_CSQ_PEEK_NEXT_IRP
Definition: csq.h:161
Definition: bufpool.h:45
NTSTATUS NTAPI IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, IN BOOLEAN Enable)
Definition: deviface.c:1315
return(0)
PIO_COMPLETION_ROUTINE CompletionRoutine
Definition: iotypes.h:2927
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
FORCEINLINE VOID IoInitializeThreadedDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2855
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES ObjectAttributes
Definition: iofuncs.h:642
NTKERNELAPI NTSTATUS NTAPI IoGetRequestorSessionId(_In_ PIRP Irp, _Out_ PULONG pSessionId)
PPC_QUAL unsigned short __inword(const unsigned long Port)
Definition: intrin_ppc.h:554
PIRP NTAPI IoMakeAssociatedIrp(IN PIRP Irp, IN CCHAR StackSize)
Definition: irp.c:1848
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp
Definition: iofuncs.h:1884
VOID NTAPI IoInitializeWorkItem(_In_ PVOID IoObject, _Out_ PIO_WORKITEM IoWorkItem)
__drv_aliasesMem _In_ PVOID ClientIdentificationAddress
Definition: iofuncs.h:1026
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
Definition: device.c:1180
VOID NTAPI IoFreeAdapterChannel(IN PADAPTER_OBJECT AdapterObject)
Definition: dma.c:103
_In_ PVOID Argument2
Definition: classpnp.h:680
#define CONST
Definition: compiler.h:170
_Out_ PIO_STATUS_BLOCK _In_ ULONG _In_ FS_INFORMATION_CLASS FsInformationClass
Definition: iofuncs.h:919
PKEVENT NTAPI IoCreateNotificationEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
Definition: ioevent.c:70
PPC_QUAL void __outword(unsigned long const Port, const unsigned short Data)
Definition: intrin_ppc.h:621
enum _FSINFOCLASS FS_INFORMATION_CLASS
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG _In_ FILE_INFORMATION_CLASS FileInformationClass
Definition: iofuncs.h:841
NTSTATUS NTAPI IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject, IN ULONG Action)
Definition: wmi.c:68
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetDeviceAttachmentBaseRef(_In_ PDEVICE_OBJECT DeviceObject)
NTKERNELAPI VOID NTAPI IoCsqInsertIrp(_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context)
Insert an IRP into the CSQ.
Definition: csq.c:177
NTKERNELAPI NTSTATUS NTAPI IoEnumerateDeviceObjectList(_In_ PDRIVER_OBJECT DriverObject, _Out_writes_bytes_to_opt_(DeviceObjectListSize,(*ActualNumberDeviceObjects)*sizeof(PDEVICE_OBJECT)) PDEVICE_OBJECT *DeviceObjectList, _In_ ULONG DeviceObjectListSize, _Out_ PULONG ActualNumberDeviceObjects)
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
UINTN Size
Definition: acefiex.h:555
PVOID NTAPI IoAllocateErrorLogEntry(IN PVOID IoObject, IN UCHAR EntrySize)
Definition: error.c:520
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN _In_ BOOLEAN _In_ BOOLEAN InvokeOnCancel
Definition: iofuncs.h:1935
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp
Definition: iofuncs.h:1884
PPC_QUAL void __movsb(unsigned char *Destination, const unsigned char *Source, unsigned long Count)
Definition: intrin_ppc.h:323
PVOID NTAPI IoGetSfioStreamIdentifier(_In_ PFILE_OBJECT FileObject, _In_ PVOID Signature)
_In_ PIRP _In_ PVOID InsertContext
Definition: csq.h:257
_Must_inspect_result_ NTKERNELAPI NTSTATUS NTAPI IoWMIWriteEvent(_Inout_ _When_(return==0, __drv_aliasesMem) PVOID WnodeEventItem)
VOID FASTCALL IofCompleteRequest(IN PIRP Irp, IN CCHAR PriorityBoost)
Definition: irp.c:1245
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: file.c:104
#define _Out_opt_
Definition: no_sal2.h:339
enum _IO_PAGING_PRIORITY IO_PAGING_PRIORITY
IN OUT PIRP IN ULONG IN ULONG IN ULONG InstanceCount
Definition: wmilib.h:45
unsigned char BOOLEAN
NTKERNELAPI NTSTATUS NTAPI IoVerifyVolume(_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN AllowRawMount)
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _Inout_opt_ PVOID _In_opt_ ULONG _In_opt_ PLARGE_INTEGER StartingOffset
Definition: iofuncs.h:699
PVOID NTAPI IoGetInitialStack(VOID)
Definition: util.c:40
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetLowerDeviceObject(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject, IN PDEVICE_OBJECT DeviceObject, IN ULONG NumberOfMapRegisters, IN PDRIVER_CONTROL ExecutionRoutine, IN PVOID Context)
Definition: adapter.c:30
ACPI_EFI_GUID ACPI_EFI_INTERFACE_TYPE InterfaceType
Definition: acefiex.h:603
_Outptr_ PDEVICE_OBJECT * DiskDeviceObject
Definition: fltkernel.h:1673
NTKERNELAPI NTSTATUS NTAPI IoWMISuggestInstanceName(_In_opt_ PDEVICE_OBJECT PhysicalDeviceObject, _In_opt_ PUNICODE_STRING SymbolicLinkName, _In_ BOOLEAN CombineNames, _Out_ PUNICODE_STRING SuggestedInstanceName)
NTKERNELAPI NTSTATUS NTAPI IoWMIQueryAllData(_In_ PVOID DataBlockObject, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
_At_(PropertyBuffer, _Post_z_)) _When_((DeviceProperty &__multiString_type)
char CCHAR
Definition: typedefs.h:50
NTKERNELAPI NTSTATUS NTAPI IoCsqInitializeEx(_Out_ PIO_CSQ Csq, _In_ PIO_CSQ_INSERT_IRP_EX CsqInsertIrpEx, _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp, _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp, _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock, _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock, _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp)
Set up a CSQ struct to initialize the queue (extended version)
Definition: csq.c:143
NTSTATUS NTAPI IoInitializeTimer(IN PDEVICE_OBJECT DeviceObject, IN PIO_TIMER_ROUTINE TimerRoutine, IN PVOID Context)
Definition: iotimer.c:92
#define _Ret_maybenull_
Definition: no_sal2.h:590
IN OUT PIRP IN ULONG IN ULONG IN ULONG MethodId
Definition: wmilib.h:56
NTKERNELAPI NTSTATUS NTAPI IoCheckShareAccessEx(_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Inout_ PSHARE_ACCESS ShareAccess, _In_ BOOLEAN Update, _In_ PBOOLEAN WritePermission)
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK _In_ PIO_CSQ_RELEASE_LOCK _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp
Definition: iofuncs.h:1884
#define __string_type
Definition: iotypes.h:1148
#define _Success_(expr)
Definition: no_sal2.h:635
BOOLEAN NTAPI IoRaiseInformationalHardError(IN NTSTATUS ErrorStatus, IN PUNICODE_STRING String, IN PKTHREAD Thread)
Definition: error.c:694
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_opt_ PVOID _In_ BOOLEAN InvokeOnSuccess
Definition: iofuncs.h:1935
NTKERNELAPI NTSTATUS NTAPI IoWMIQuerySingleInstanceMultiple(_In_reads_(ObjectCount) PVOID *DataBlockObjectList, _In_reads_(ObjectCount) PUNICODE_STRING InstanceNames, _In_ ULONG ObjectCount, _Inout_ ULONG *InOutBufferSize, _Out_writes_bytes_opt_(*InOutBufferSize) PVOID OutBuffer)
NTKERNELAPI VOID NTAPI IoSetShareAccess(_In_ ACCESS_MASK DesiredAccess, _In_ ULONG DesiredShareAccess, _Inout_ PFILE_OBJECT FileObject, _Out_ PSHARE_ACCESS ShareAccess)
ACPI_EFI_MEMORY_TYPE UINTN ACPI_EFI_PHYSICAL_ADDRESS * Memory
Definition: acefiex.h:530
IO_DPC_ROUTINE * PIO_DPC_ROUTINE
Definition: iotypes.h:2486
#define _Kernel_requires_resource_held_(kind)
Definition: no_sal2.h:664
PPC_QUAL void __outwordstring(unsigned long const Port, const unsigned short *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:662
FORCEINLINE VOID IoRequestDpc(_Inout_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Irp, _In_opt_ __drv_aliasesMem PVOID Context)
Definition: iofuncs.h:2702
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
Definition: iofuncs.h:2101
unsigned short * PUSHORT
Definition: retypes.h:2
Definition: bufpool.h:50
#define _Outptr_result_maybenull_
Definition: no_sal2.h:426
irpSp
Definition: iofuncs.h:2671
PIRP NTAPI IoBuildAsynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:687
NTSTATUS NTAPI IoRegisterLastChanceShutdownNotification(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1436
NTKERNELAPI NTSTATUS NTAPI IoReadDiskSignature(_In_ PDEVICE_OBJECT DeviceObject, _In_ ULONG BytesPerSector, _Out_ PDISK_SIGNATURE Signature)
BOOLEAN NTAPI IoFlushAdapterBuffers(IN PADAPTER_OBJECT AdapterObject, IN PMDL Mdl, IN PVOID MapRegisterBase, IN PVOID CurrentVa, IN ULONG Length, IN BOOLEAN WriteToDevice)
Definition: dma.c:127
VOID NTAPI IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
Definition: device.c:1498
NTKERNELAPI NTSTATUS NTAPI IoWMIOpenBlock(_In_ LPCGUID DataBlockGuid, _In_ ULONG DesiredAccess, _Out_ PVOID *DataBlockObject)
Definition: wmi.c:126
#define _Inout_
Definition: no_sal2.h:244
VOID NTAPI IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: pnpmgr.c:4683
_In_ PUNICODE_STRING DeviceName
Definition: iofuncs.h:863
NTSTATUS NTAPI IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN OPTIONAL PVOID Tag, IN LPCSTR File, IN ULONG Line, IN ULONG RemlockSize)
Definition: remlock.c:80
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER AllocationSize
Definition: iofuncs.h:642
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
NTSTATUS NTAPI IoSetPartitionInformationEx(IN PDEVICE_OBJECT DeviceObject, IN ULONG PartitionNumber, IN struct _SET_PARTITION_INFORMATION_EX *PartitionInfo)
Definition: fstubex.c:2314
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT DeviceObject
Definition: iofuncs.h:699
* PFILE_OBJECT
Definition: iotypes.h:1949
_In_ PVOID IoObject
Definition: iotypes.h:434
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:798
NTKERNELAPI NTSTATUS NTAPI IoReportResourceUsage(_In_opt_ PUNICODE_STRING DriverClassName, _In_ PDRIVER_OBJECT DriverObject, _In_reads_bytes_opt_(DriverListSize) PCM_RESOURCE_LIST DriverList, _In_opt_ ULONG DriverListSize, _In_opt_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_opt_(DeviceListSize) PCM_RESOURCE_LIST DeviceList, _In_opt_ ULONG DeviceListSize, _In_ BOOLEAN OverrideConflict, _Out_ PBOOLEAN ConflictDetected)
VOID NTAPI IoFreeMdl(PMDL Mdl)
Definition: iomdl.c:146
_In_ ULONG DesiredShareAccess
Definition: iofuncs.h:779
static IUnknown Object
Definition: main.c:512
#define SL_INVOKE_ON_ERROR
Definition: iotypes.h:2940
_In_ BOOLEAN Cancelable
Definition: iofuncs.h:1255
_In_ PDEVICE_OBJECT SparePdo
Definition: iofuncs.h:2515
VOID NTAPI IoRegisterBootDriverReinitialization(IN PDRIVER_OBJECT DriverObject, IN PDRIVER_REINITIALIZE ReinitRoutine, IN PVOID Context)
Definition: driver.c:1647
VOID(NTAPI * PFREE_MAP_REGISTERS)(_In_ PDMA_ADAPTER DmaAdapter, PVOID MapRegisterBase, ULONG NumberOfMapRegisters)
Definition: iotypes.h:2225
Definition: ncftp.h:79
_In_ INTERFACE_TYPE LegacyBusType
Definition: iofuncs.h:1543
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: iofuncs.h:728
_In_opt_ PVPB _In_ PDEVICE_OBJECT RealDeviceObject
Definition: iofuncs.h:1499
NTKERNELAPI NTSTATUS NTAPI IoCreateDisk(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ struct _CREATE_DISK *Disk)
VOID NTAPI IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: pnpmgr.c:4120
_In_ PIO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE _In_opt_ __drv_aliasesMem PVOID Context
Definition: iofuncs.h:1046
enum _WORK_QUEUE_TYPE WORK_QUEUE_TYPE
unsigned char UCHAR
Definition: xmlstorage.h:181
#define _Reserved_
Definition: no_sal2.h:573
char * PBOOLEAN
Definition: retypes.h:11
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: iofuncs.h:1543
NTKERNELAPI VOID NTAPI IoUnregisterFileSystem(_In_ PDEVICE_OBJECT DeviceObject)
_In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
Definition: iofuncs.h:593
_In_ LPGUID Guid
Definition: classpnp.h:778
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine
Definition: iofuncs.h:1146
IO_CSQ_INSERT_IRP * PIO_CSQ_INSERT_IRP
Definition: csq.h:117
VOID UINTN Length
Definition: acefiex.h:744
_In_opt_ PVOID _In_ PCSTR _In_ ULONG _In_ ULONG RemlockSize
Definition: iofuncs.h:615
IN OUT PIRP IN ULONG IN ULONG IN ULONG IN ULONG InBufferSize
Definition: wmilib.h:56
_In_ ULONG RequiredAccess
Definition: iofuncs.h:2219
KDEFERRED_ROUTINE * PKDEFERRED_ROUTINE
Definition: ketypes.h:663
BOOLEAN NTAPI IoTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: pnpmgr.c:4836
NTHALAPI PHYSICAL_ADDRESS NTAPI IoMapTransfer(_In_ PADAPTER_OBJECT AdapterObject, _In_ PMDL Mdl, _In_ PVOID MapRegisterBase, _In_ PVOID CurrentVa, _Inout_ PULONG Length, _In_ BOOLEAN WriteToDevice)
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
enum _IO_CONTAINER_NOTIFICATION_CLASS IO_CONTAINER_NOTIFICATION_CLASS
BOOLEAN NTAPI IoSetThreadHardErrorMode(IN BOOLEAN HardErrorEnabled)
Definition: error.c:707
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
Definition: iofuncs.h:2046
#define _Outptr_result_nullonfailure_
Definition: no_sal2.h:428
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1783
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN _In_ KAFFINITY _In_ BOOLEAN FloatingSave
Definition: iofuncs.h:798
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
PPC_QUAL void __indwordstring(unsigned long Port, unsigned long *Buffer, unsigned long Count)
Definition: intrin_ppc.h:598
NTSTATUS NTAPI IoRegisterPlugPlayNotification(IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory, IN ULONG EventCategoryFlags, IN PVOID EventCategoryData OPTIONAL, IN PDRIVER_OBJECT DriverObject, IN PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine, IN PVOID Context, OUT PVOID *NotificationEntry)
Definition: pnpnotify.c:250
#define InterlockedOr
Definition: interlocked.h:224
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
NTSTATUS NTAPI IoWritePartitionTableEx(IN PDEVICE_OBJECT DeviceObject, IN struct _DRIVE_LAYOUT_INFORMATION_EX *DriveLayout)
Definition: fstubex.c:2431
NTKERNELAPI VOID NTAPI IoFreeErrorLogEntry(_In_ PVOID ElEntry)
_In_ USHORT _In_ CCHAR StackSize
Definition: iofuncs.h:1056
NTKERNELAPI NTSTATUS NTAPI IoSynchronousPageWrite(_In_ PFILE_OBJECT FileObject, _In_ PMDL Mdl, _In_ PLARGE_INTEGER FileOffset, _In_ PKEVENT Event, _Out_ PIO_STATUS_BLOCK IoStatusBlock)
VOID(NTAPI * PDRIVER_REINITIALIZE)(_In_ struct _DRIVER_OBJECT *DriverObject, _In_opt_ PVOID Context, _In_ ULONG Count)
Definition: iotypes.h:4066
PHYSICAL_ADDRESS(NTAPI * PMAP_TRANSFER)(_In_ PDMA_ADAPTER DmaAdapter, _In_ PMDL Mdl, _In_ PVOID MapRegisterBase, _In_ PVOID CurrentVa, _Inout_ PULONG Length, _In_ BOOLEAN WriteToDevice)
Definition: iotypes.h:2231
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: iofuncs.h:642
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_In_ UCHAR MinorFunction
Definition: pofuncs.h:42
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2647
DRIVER_DISPATCH(nfs41_FsdDispatch)
UINTN UINT8 Value
Definition: acefiex.h:751
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
_In_ ULONG _In_ BOOLEAN SecondaryBuffer
Definition: iofuncs.h:657
enum _IO_PRIORITY_HINT IO_PRIORITY_HINT
NTKERNELAPI NTSTATUS NTAPI IoReplaceFileObjectName(_In_ PFILE_OBJECT FileObject, _In_reads_bytes_(FileNameLength) PWSTR NewFileName, _In_ USHORT FileNameLength)
NTSTATUS FASTCALL IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
Definition: partition.c:310
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ HANDLE _In_ ULONG FileNameLength
Definition: fltkernel.h:1129
_In_ ULONG _In_ ACCESS_MASK _Out_ PHANDLE DevInstRegKey
Definition: iofuncs.h:1123
NTKERNELAPI NTSTATUS NTAPI IoRegisterFsRegistrationChange(_In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine)
IN PUCHAR IN ULONG Count
Definition: iofuncs.h:45
NTKERNELAPI PIRP NTAPI IoCsqRemoveIrp(_Inout_ PIO_CSQ Csq, _Inout_ PIO_CSQ_IRP_CONTEXT Context)
Remove anb IRP from the queue.
Definition: csq.c:326
NTSTATUS NTAPI IoGetIrpExtraCreateParameter(_In_ PIRP Irp, _Outptr_result_maybenull_ struct _ECP_LIST **ExtraCreateParameter)
VOID NTAPI IoReleaseCancelSpinLock(IN KIRQL Irql)
Definition: util.c:123
Status
Definition: gdiplustypes.h:24
NTKERNELAPI NTSTATUS NTAPI IoConnectInterruptEx(_Inout_ PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
ULONG NTAPI IoSizeofWorkItem(VOID)
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID InputBuffer
Definition: iofuncs.h:713
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK IoStatus
Definition: npfs.h:636
PMDL NTAPI IoAllocateMdl(IN PVOID VirtualAddress, IN ULONG Length, IN BOOLEAN SecondaryBuffer, IN BOOLEAN ChargeQuota, IN PIRP Irp)
Definition: iomdl.c:22
#define __multiString_type
Definition: iotypes.h:1150
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE CompletionRoutine
Definition: iofuncs.h:1935
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _Post_z_
Definition: no_sal2.h:469
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
#define _In_
Definition: no_sal2.h:204
NTKERNELAPI VOID NTAPI IoCancelFileOpen(_In_ PDEVICE_OBJECT DeviceObject, _In_ PFILE_OBJECT FileObject)
NTSTATUS NTAPI IoCheckShareAccess(IN ACCESS_MASK DesiredAccess, IN ULONG DesiredShareAccess, IN PFILE_OBJECT FileObject, IN PSHARE_ACCESS ShareAccess, IN BOOLEAN Update)
Definition: file.c:2994
IO_WORKITEM_ROUTINE_EX * PIO_WORKITEM_ROUTINE_EX
Definition: iotypes.h:489
Definition: csq.h:222
static HANDLE FileHandle
Definition: cabinet.c:47
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
ULONG_PTR SIZE_T
Definition: typedefs.h:78
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1025
NTKERNELAPI NTSTATUS NTAPI IoCheckQuerySetVolumeInformation(_In_ FS_INFORMATION_CLASS FsInformationClass, _In_ ULONG Length, _In_ BOOLEAN SetOperation)
VOID(NTAPI * PIO_DEVICE_EJECT_CALLBACK)(_In_ NTSTATUS Status, _Inout_opt_ PVOID Context)
Definition: iotypes.h:826
DWORD *typedef HANDLE
Definition: winlogon.h:52
VOID NTAPI IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_RELATION_TYPE Type)
Definition: pnpmgr.c:4771
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
Definition: iotypes.h:189
NTSTATUS NTAPI IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject, IN CONST GUID *InterfaceClassGuid, IN PUNICODE_STRING ReferenceString OPTIONAL, OUT PUNICODE_STRING SymbolicLinkName)
Definition: deviface.c:959
PPC_QUAL void __movsw(unsigned short *Destination, const unsigned short *Source, unsigned long Count)
Definition: intrin_ppc.h:328
NTKERNELAPI NTSTATUS NTAPI IoCreateDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ ULONG DeviceExtensionSize, _In_opt_ PUNICODE_STRING DeviceName, _In_ DEVICE_TYPE DeviceType, _In_ ULONG DeviceCharacteristics, _In_ BOOLEAN Exclusive, _Outptr_result_nullonfailure_ _At_(*DeviceObject, __drv_allocatesMem(Mem) _When_(((_In_function_class_(DRIVER_INITIALIZE))||(_In_function_class_(DRIVER_DISPATCH))), __drv_aliasesMem)) PDEVICE_OBJECT *DeviceObject)
LONG NTSTATUS
Definition: DriverTester.h:11
__drv_freesMem(Mem) _IRQL_requires_max_(DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI IoFreeIrp(_In_ PIRP Irp)
Definition: exfuncs.h:1315
__drv_allocatesMem(Mem) _IRQL_requires_max_(DISPATCH_LEVEL) NTKERNELAPI PIO_WORKITEM NTAPI IoAllocateWorkItem(_In_ PDEVICE_OBJECT DeviceObject)
Definition: exfuncs.h:1197
NTKERNELAPI NTSTATUS NTAPI IoWMIExecuteMethod(_In_ PVOID DataBlockObject, _In_ PUNICODE_STRING InstanceName, _In_ ULONG MethodId, _In_ ULONG InBufferSize, _Inout_ PULONG OutBufferSize, _Inout_updates_bytes_to_opt_(*OutBufferSize, InBufferSize) PUCHAR InOutBuffer)
PCONTROLLER_OBJECT NTAPI IoCreateController(IN ULONG Size)
Definition: controller.c:57
_In_ USHORT PacketSize
Definition: iofuncs.h:1056
_In_ PIRP _In_opt_ PULONG _In_opt_ PDRIVER_CANCEL CancelFunction
Definition: iofuncs.h:1272
PDEVICE_LIST DeviceList
Definition: utils.c:27
_In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: iofuncs.h:1003
_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Deref_out_range_(<=, BufferLength) PULONG ResultLength)
unsigned short USHORT
Definition: pedump.c:61
_In_ ULONG AllocateTag
Definition: iofuncs.h:1065
__kernel_entry _Inout_ _Inout_ PSIZE_T RegionSize
Definition: mmfuncs.h:172
_In_ PIO_WORKITEM_ROUTINE WorkerRoutine
Definition: iofuncs.h:1046
#define SL_INVOKE_ON_SUCCESS
Definition: iotypes.h:2939
VOID NTAPI IoStartNextPacketByKey(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable, IN ULONG Key)
Definition: device.c:1590
ULONG_PTR KAFFINITY
Definition: compat.h:75
NTKERNELAPI NTSTATUS NTAPI IoAttachDeviceByPointer(_In_ PDEVICE_OBJECT SourceDevice, _In_ PDEVICE_OBJECT TargetDevice)
struct _IO_PRIORITY_INFO IO_PRIORITY_INFO
NTKERNELAPI PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:112
ActualNumberDriverObjects _In_ ULONG _Out_ PULONG ActualNumberDriverObjects
Definition: iofuncs.h:2281
_Out_ PUNICODE_STRING DosName
Definition: rtlfuncs.h:1270
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
NTKERNELAPI NTSTATUS NTAPI IoAllocateDriverObjectExtension(_In_ PDRIVER_OBJECT DriverObject, _In_ PVOID ClientIdentificationAddress, _In_ ULONG DriverObjectExtensionSize, _Post_ _At_(*DriverObjectExtension, _When_(return==0, __drv_aliasesMem __drv_allocatesMem(Mem) _Post_notnull_)) _When_(return==0, _Outptr_result_bytebuffer_(DriverObjectExtensionSize)) PVOID *DriverObjectExtension)
_In_ CONST GUID * InterfaceClassGuid
Definition: iofuncs.h:1134
NTKERNELAPI PFILE_OBJECT NTAPI IoCreateStreamFileObjectLite(_In_opt_ PFILE_OBJECT FileObject, _In_opt_ PDEVICE_OBJECT DeviceObject)
unsigned int * PULONG
Definition: retypes.h:1
DEVICE_CHANGE_COMPLETE_CALLBACK * PDEVICE_CHANGE_COMPLETE_CALLBACK
Definition: iotypes.h:1210
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_USHORT(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: portio.c:87
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG ShareAccess
Definition: iofuncs.h:642
NTKERNELAPI NTSTATUS NTAPI IoGetBootDiskInformation(_Inout_ PBOOTDISK_INFORMATION BootDiskInformation, _In_ ULONG Size)
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_USHORT(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
_Requires_lock_held_(_Global_cancel_spin_lock_) _Releases_lock_(_Global_cancel_spin_lock_) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_min_(DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI IoReleaseCancelSpinLock(_In_ _IRQL_restores_ _IRQL_uses_cancel_ KIRQL Irql)
VOID NTAPI IoGetStackLimits(OUT PULONG_PTR LowLimit, OUT PULONG_PTR HighLimit)
Definition: util.c:51
NTHALAPI VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123
NTKERNELAPI NTSTATUS NTAPI IoCsqInsertIrpEx(_Inout_ PIO_CSQ Csq, _Inout_ PIRP Irp, _Out_opt_ PIO_CSQ_IRP_CONTEXT Context, _In_opt_ PVOID InsertContext)
Insert an IRP into the CSQ, with additional tracking context.
Definition: csq.c:205
IO_COMPLETION_ROUTINE * PIO_COMPLETION_ROUTINE
Definition: iotypes.h:2474
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
VOID NTAPI IoDeleteController(IN PCONTROLLER_OBJECT ControllerObject)
Definition: controller.c:114
VOID NTAPI IoFreeController(IN PCONTROLLER_OBJECT ControllerObject)
Definition: controller.c:125
NTSTATUS NTAPI IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject, IN ULONG DevInstKeyType, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DevInstRegKey)
Definition: pnpmgr.c:4251
IO_CSQ_RELEASE_LOCK * PIO_CSQ_RELEASE_LOCK
Definition: csq.h:196
PKEVENT NTAPI IoCreateSynchronizationEvent(IN PUNICODE_STRING EventName, IN PHANDLE EventHandle)
Definition: ioevent.c:82
PPC_QUAL void __outdword(unsigned long const Port, const unsigned long Data)
Definition: intrin_ppc.h:637
_In_opt_ PIRP _In_opt_ PVOID PeekContext
Definition: csq.h:159
BOOL FixErrors
Definition: chkdsk.c:66
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
Definition: irp.c:818
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_UCHAR(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
IN ULONG IN ULONG Tag
Definition: evtlib.h:155
BOOLEAN NTAPI IoCancelIrp(IN PIRP Irp)
Definition: irp.c:1038
NTSTATUS NTAPI IoCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG Disposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength, IN CREATE_FILE_TYPE CreateFileType, IN PVOID ExtraCreateParameters OPTIONAL, IN ULONG Options)
Definition: file.c:2614
_In_ PLARGE_INTEGER FileOffset
Definition: cctypes.h:53
NTSTATUS NTAPI IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
Definition: device.c:1467
IO_CSQ Csq
Definition: csqrtns.c:46
_In_ PIO_TIMER_ROUTINE TimerRoutine
Definition: iofuncs.h:1076
PPC_QUAL void __inwordstring(unsigned long Port, unsigned short *Buffer, unsigned long Count)
Definition: intrin_ppc.h:591
BOOLEAN(NTAPI * PFLUSH_ADAPTER_BUFFERS)(_In_ PDMA_ADAPTER DmaAdapter, _In_ PMDL Mdl, _In_ PVOID MapRegisterBase, _In_ PVOID CurrentVa, _In_ ULONG Length, _In_ BOOLEAN WriteToDevice)
Definition: iotypes.h:2212
IO_PRIORITY_HINT NTAPI IoGetIoPriorityHint(_In_ PIRP Irp)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_ ULONG _In_ CREATE_FILE_TYPE _In_opt_ PVOID _In_ ULONG Options
Definition: iofuncs.h:835
NTHALAPI UCHAR NTAPI READ_PORT_UCHAR(IN PUCHAR Port)
Definition: portio.c:56
NTKERNELAPI PEPROCESS NTAPI IoThreadToProcess(_In_ PETHREAD Thread)
PPC_QUAL void __movsd(unsigned long *Destination, const unsigned long *Source, unsigned long Count)
Definition: intrin_ppc.h:333
Definition: iotypes.h:166
_In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: iofuncs.h:1003
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST ResourceList
Definition: iofuncs.h:1543
NTSTATUS FASTCALL IoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
Definition: ntoskrnl.c:64
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1589
* PCONFIGURATION_TYPE
Definition: iotypes.h:4004
IO_CSQ_INSERT_IRP_EX * PIO_CSQ_INSERT_IRP_EX
Definition: csq.h:259
#define SL_INVOKE_ON_CANCEL
Definition: iotypes.h:2938
_In_ PDEVICE_OBJECT _In_ ULONG _In_ PDRIVER_CONTROL ExecutionRoutine
Definition: iofuncs.h:1393
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_UCHAR(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:77
#define _Kernel_IoGetDmaAdapter_
Definition: no_sal2.h:662
PVOID PIRP
Definition: usb.h:38
IO_TIMER_ROUTINE * PIO_TIMER_ROUTINE
Definition: iotypes.h:2502
#define _Outptr_result_bytebuffer_(size)
Definition: no_sal2.h:420
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK IoStatusBlock
Definition: iofuncs.h:642
unsigned int ULONG
Definition: retypes.h:1
FWMI_NOTIFICATION_CALLBACK * WMI_NOTIFICATION_CALLBACK
Definition: iotypes.h:3095
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
NTKERNELAPI USHORT NTAPI READ_REGISTER_USHORT(IN PUSHORT Register)
NTKERNELAPI NTSTATUS NTAPI IoCheckQuotaBufferValidity(_In_ PFILE_QUOTA_INFORMATION QuotaBuffer, _In_ ULONG QuotaLength, _Out_ PULONG ErrorOffset)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ULONG_PTR
Definition: config.h:101
uint32_t * PULONG_PTR
Definition: typedefs.h:63
NTSTATUS NTAPI IoFreeSfioStreamIdentifier(_In_ PFILE_OBJECT FileObject, _In_ PVOID Signature)
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
DRIVER_CONTROL * PDRIVER_CONTROL
Definition: iotypes.h:192
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements
Definition: iofuncs.h:1543
#define _IRQL_raises_(irql)
Definition: no_sal2.h:648
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
Definition: util.c:292
NTKERNELAPI PIRP NTAPI IoCsqRemoveNextIrp(_Inout_ PIO_CSQ Csq, _In_opt_ PVOID PeekContext)
IoCsqRemoveNextIrp - Removes the next IRP from the queue.
Definition: csq.c:398
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:552
NTKERNELAPI NTSTATUS NTAPI IoCsqInitialize(_Out_ PIO_CSQ Csq, _In_ PIO_CSQ_INSERT_IRP CsqInsertIrp, _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp, _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp, _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock, _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock, _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp)
Set up a CSQ struct to initialize the queue.
Definition: csq.c:103
VOID NTAPI IoRaiseHardError(IN PIRP Irp, IN PVPB Vpb, IN PDEVICE_OBJECT RealDeviceObject)
Definition: error.c:656
IO_CSQ_COMPLETE_CANCELED_IRP * PIO_CSQ_COMPLETE_CANCELED_IRP
Definition: csq.h:217
NTSTATUS(NTAPI * PIO_QUERY_DEVICE_ROUTINE)(_In_ PVOID Context, _In_ PUNICODE_STRING PathName, _In_ INTERFACE_TYPE BusType, _In_ ULONG BusNumber, _In_ PKEY_VALUE_FULL_INFORMATION *BusInformation, _In_ CONFIGURATION_TYPE ControllerType, _In_ ULONG ControllerNumber, _In_ PKEY_VALUE_FULL_INFORMATION *ControllerInformation, _In_ CONFIGURATION_TYPE PeripheralType, _In_ ULONG PeripheralNumber, _In_ PKEY_VALUE_FULL_INFORMATION *PeripheralInformation)
Definition: iotypes.h:4045
VOID NTAPI IoUnregisterContainerNotification(_In_ PVOID CallbackRegistration)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD _Inout_ PIO_PRIORITY_INFO PriorityInfo
Definition: fltkernel.h:2653
Definition: File.h:15
NTSTATUS FASTCALL IoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
Definition: ntoskrnl.c:87
_In_ ULONG _In_ ULONG MaxLockedMinutes
Definition: iofuncs.h:1065
_In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG _In_opt_ PCM_RESOURCE_LIST _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST _In_ BOOLEAN ResourceAssigned
Definition: iofuncs.h:1543
_In_ ULONG _Inout_ PFILE_OBJECT _Inout_ PSHARE_ACCESS _In_ BOOLEAN Update
Definition: iofuncs.h:779
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1714
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
NTKERNELAPI BOOLEAN NTAPI IoForwardIrpSynchronously(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
NTKERNELAPI VOID NTAPI IoReleaseVpbSpinLock(_In_ KIRQL Irql)
_In_opt_ PVPB Vpb
Definition: iofuncs.h:1499
#define IoWMIDeviceObjectToProviderId(DeviceObject)
_In_ ULONG _In_ ULONG _In_ ULONG HighWatermark
Definition: iofuncs.h:1065
static const WCHAR Signature[]
Definition: parser.c:141
NTKERNELAPI NTSTATUS NTAPI IoSetFileOrigin(_In_ PFILE_OBJECT FileObject, _In_ BOOLEAN Remote)
NTSTATUS NTAPI IoReportTargetDeviceChangeAsynchronous(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PVOID NotificationStructure, IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL, IN PVOID Context OPTIONAL)
Definition: pnpreport.c:466
_In_ CONST DEVPROPKEY _In_ LCID _Reserved_ ULONG _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: iofuncs.h:2422
_In_ PIO_CSQ_INSERT_IRP _In_ PIO_CSQ_REMOVE_IRP _In_ PIO_CSQ_PEEK_NEXT_IRP _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock
Definition: iofuncs.h:1884
NTKERNELAPI PDEVICE_OBJECT NTAPI IoGetAttachedDevice(IN PDEVICE_OBJECT DeviceObject)
NTKERNELAPI PEPROCESS NTAPI IoGetRequestorProcess(_In_ PIRP Irp)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_reads_bytes_opt_(EaLength) PVOID EaBuffer
_In_ ULONG _Inout_ PFILE_OBJECT FileObject
Definition: iofuncs.h:779
#define APC_LEVEL
Definition: env_spec_w32.h:695
NTSTATUS FASTCALL IofCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1195
VOID NTAPI IoUpdateShareAccess(IN PFILE_OBJECT FileObject, OUT PSHARE_ACCESS ShareAccess)
Definition: file.c:2955
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
VOID NTAPI IoUninitializeWorkItem(_Inout_ PIO_WORKITEM IoWorkItem)
NTHALAPI VOID NTAPI READ_PORT_BUFFER_USHORT(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
Definition: iofuncs.h:2632
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define _NTDDK_
VOID(NTAPI * PFREE_ADAPTER_CHANNEL)(_In_ PDMA_ADAPTER DmaAdapter)
Definition: iotypes.h:2221
_In_opt_ PDEVICE_OBJECT PhysicalDeviceObject
Definition: iofuncs.h:977
NTKERNELAPI VOID NTAPI IoQueueThreadIrp(_In_ PIRP Irp)
DRIVER_FS_NOTIFICATION * PDRIVER_FS_NOTIFICATION
Definition: iotypes.h:6972
NTKERNELAPI VOID NTAPI WRITE_REGISTER_BUFFER_ULONG(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
IN SCSI_ADAPTER_CONTROL_TYPE IN PVOID Parameters
Definition: srb.h:488
NTKERNELAPI ULONG NTAPI IoGetRequestorProcessId(_In_ PIRP Irp)
#define _IRQL_restores_
Definition: no_sal2.h:653
NTKERNELAPI NTSTATUS NTAPI IoGetDiskDeviceObject(_In_ PDEVICE_OBJECT FileSystemDeviceObject, _Out_ PDEVICE_OBJECT *DiskDeviceObject)
NTHALAPI VOID NTAPI WRITE_PORT_BUFFER_ULONG(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: portio.c:97
#define _IRQL_uses_cancel_
Definition: no_sal2.h:657
#define _Inout_opt_
Definition: no_sal2.h:258
_In_ PKSERVICE_ROUTINE ServiceRoutine
Definition: iofuncs.h:798
BOOLEAN NTAPI IoIsWdmVersionAvailable(IN UCHAR MajorVersion, IN UCHAR MinorVersion)
Definition: util.c:99
VOID NTAPI IoSetStartIoAttributes(_In_ PDEVICE_OBJECT DeviceObject, _In_ BOOLEAN DeferredStartIo, _In_ BOOLEAN NonCancelable)
VOID NTAPI IoStartNextPacket(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable)
Definition: device.c:1620
NTKERNELAPI NTSTATUS NTAPI IoCheckDesiredAccess(_Inout_ PACCESS_MASK DesiredAccess, _In_ ACCESS_MASK GrantedAccess)
NTKERNELAPI NTSTATUS NTAPI IoQueryDeviceDescription(_In_opt_ PINTERFACE_TYPE BusType, _In_opt_ PULONG BusNumber, _In_opt_ PCONFIGURATION_TYPE ControllerType, _In_opt_ PULONG ControllerNumber, _In_opt_ PCONFIGURATION_TYPE PeripheralType, _In_opt_ PULONG PeripheralNumber, _In_ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, _Inout_opt_ PVOID Context)
NTSTATUS NTAPI IoRegisterContainerNotification(_In_ IO_CONTAINER_NOTIFICATION_CLASS NotificationClass, _In_ PIO_CONTAINER_NOTIFICATION_FUNCTION CallbackFunction, _In_reads_bytes_opt_(NotificationInformationLength) PVOID NotificationInformation, _In_ ULONG NotificationInformationLength, _Out_ PVOID CallbackRegistration)
_In_ CONST DEVPROPKEY * PropertyKey
Definition: iofuncs.h:2408
_IRQL_requires_max_(PASSIVE_LEVEL) NTSYSAPI NTSTATUS NTAPI ZwCreateFile(_Out_ PHANDLE FileHandle
Definition: Messaging.c:37
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
Definition: intrin_ppc.h:539
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:855
NTKERNELAPI VOID NTAPI READ_REGISTER_BUFFER_USHORT(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
enum _CREATE_FILE_TYPE CREATE_FILE_TYPE