ReactOS 0.4.15-dev-6669-g8227c5d
wdfdevice.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5_WdfVersionBuild_
6
7Module Name:
8
9 wdfdevice.h
10
11Abstract:
12
13
14Environment:
15
16 kernel mode only
17
18Revision History:
19
20--*/
21
22//
23// NOTE: This header is generated by stubwork. Please make any
24// modifications to the corresponding template files
25// (.x or .y) and use stubwork to regenerate the header
26//
27
28#ifndef _WDFDEVICE_H_
29#define _WDFDEVICE_H_
30
31#ifndef WDF_EXTERN_C
32 #ifdef __cplusplus
33 #define WDF_EXTERN_C extern "C"
34 #define WDF_EXTERN_C_START extern "C" {
35 #define WDF_EXTERN_C_END }
36 #else
37 #define WDF_EXTERN_C
38 #define WDF_EXTERN_C_START
39 #define WDF_EXTERN_C_END
40 #endif
41#endif
42
44
45
46
47
48#include <devpropdef.h>
49
50
51#if (NTDDI_VERSION >= NTDDI_WIN2K)
52
53
54// begin_wpp enum
56 WdfDevStateNP = 0x8000,
58
59// end_wpp
60
61// begin_wpp enum
124
125// end_wpp
126
127// begin_wpp enum
225
226// end_wpp
227
228
229// begin_wpp enum
387
388// end_wpp
389
397
404
410
414
420
431
432
433
439
448
457
466
472
478
479
480
481//
482// If you do not want the auto inclusion of wdmsec.h, define
483// WDF_DEVICE_NO_WDMSEC_H before including this file (or wdf.h)
484//
485#ifndef WDF_DEVICE_NO_WDMSEC_H
486#include <wdmsec.h>
487#endif // WDF_DEVICE_NO_WDMSEC_H
488
489
490#define WDF_S0_IDLE_ENABLED_VALUE_NAME L"IdleInWorkingState"
491#define WDF_SX_WAKE_ENABLED_VALUE_NAME L"WakeFromSleepState"
492#define WDF_S0_IDLE_DEFAULT_VALUE_NAME L"WdfDefaultIdleInWorkingState"
493#define WDF_SX_WAKE_DEFAULT_VALUE_NAME L"WdfDefaultWakeFromSleepState"
494//
495// Declare empty definitions so that they may be referenced by
496// routines before they are defined.
497//
498
499// enum _WDF_REQUEST_TYPE;
500// typedef enum _WDF_REQUEST_TYPE WDF_REQUEST_TYPE;
501
502typedef enum _WDF_REQUEST_TYPE { // taken from wdfrequest.h
536
537typedef
538_Function_class_(EVT_WDF_DEVICE_FILE_CREATE)
541VOID
543EVT_WDF_DEVICE_FILE_CREATE(
544 _In_
545 WDFDEVICE Device,
546 _In_
547 WDFREQUEST Request,
548 _In_
549 WDFFILEOBJECT FileObject
550 );
551
552typedef EVT_WDF_DEVICE_FILE_CREATE *PFN_WDF_DEVICE_FILE_CREATE;
553
554typedef
555_Function_class_(EVT_WDF_FILE_CLOSE)
558VOID
560EVT_WDF_FILE_CLOSE(
561 _In_
562 WDFFILEOBJECT FileObject
563 );
564
565typedef EVT_WDF_FILE_CLOSE *PFN_WDF_FILE_CLOSE;
566
567typedef
568_Function_class_(EVT_WDF_FILE_CLEANUP)
571VOID
573EVT_WDF_FILE_CLEANUP(
574 _In_
575 WDFFILEOBJECT FileObject
576 );
577
578typedef EVT_WDF_FILE_CLEANUP *PFN_WDF_FILE_CLEANUP;
579
581 //
582 // Size of this structure in bytes
583 //
585
586 //
587 // Event callback for create requests
588 //
590
591 //
592 // Event callback for close requests
593 //
595
596 //
597 // Event callback for cleanup requests
598 //
600
601 //
602 // If WdfTrue, create/cleanup/close file object related requests will be
603 // sent down the stack.
604 //
605 // If WdfFalse, create/cleanup/close will be completed at this location in
606 // the device stack.
607 //
608 // If WdfDefault, behavior depends on device type
609 // FDO, PDO, Control: use the WdfFalse behavior
610 // Filter: use the WdfTrue behavior
611 //
613
614 //
615 // Specify whether framework should create WDFFILEOBJECT and also
616 // whether it can FsContexts fields in the WDM fileobject to store
617 // WDFFILEOBJECT so that it can avoid table look up and improve perf.
618 //
620
622
624VOID
626 _Out_ PWDF_FILEOBJECT_CONFIG FileEventCallbacks,
627 _In_opt_ PFN_WDF_DEVICE_FILE_CREATE EvtDeviceFileCreate,
628 _In_opt_ PFN_WDF_FILE_CLOSE EvtFileClose,
629 _In_opt_ PFN_WDF_FILE_CLEANUP EvtFileCleanup
630 )
631{
632 FileEventCallbacks->Size = sizeof(WDF_FILEOBJECT_CONFIG);
633
634 FileEventCallbacks->EvtDeviceFileCreate = EvtDeviceFileCreate;
635 FileEventCallbacks->EvtFileClose = EvtFileClose;
636 FileEventCallbacks->EvtFileCleanup = EvtFileCleanup;
637
638 FileEventCallbacks->FileObjectClass = WdfFileObjectWdfCannotUseFsContexts;
639 FileEventCallbacks->AutoForwardCleanupClose = WdfUseDefault;
640}
641
643 //
644 // Type of data
645 //
647
648 union {
649 struct {
650 //
651 // The current state that is about to be exited
652 //
654
655 //
656 // The new state that is about to be entered
657 //
660
661 struct {
662 //
663 // The current state
664 //
667
668
669 struct {
670 //
671 // The current state that is about to be exitted
672 //
674
675 //
676 // The state that is about to be entered
677 //
682
684
686 //
687 // Type of data
688 //
690
691 union {
692 struct {
693 //
694 // The current state that is about to be exitted
695 //
697
698 //
699 // The new state that is about to be entered
700 //
703
704 struct {
705 //
706 // The current state
707 //
710
711
712 struct {
713 //
714 // The current state that is about to be exitted
715 //
717
718 //
719 // The state that is about to be entered
720 //
725
727
729 //
730 // Type of data
731 //
733
734 union {
735 struct {
736 //
737 // The current state that is about to be exitted
738 //
740
741 //
742 // The new state that is about to be entered
743 //
746
747 struct {
748 //
749 // The current state
750 //
753
754
755 struct {
756 //
757 // The current state that is about to be exitted
758 //
760
761 //
762 // The state that is about to be entered
763 //
768
770
771typedef
772_Function_class_(EVT_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION)
775VOID
777EVT_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION(
778 _In_
779 WDFDEVICE Device,
780 _In_
782 );
783
784typedef EVT_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION *PFN_WDF_DEVICE_PNP_STATE_CHANGE_NOTIFICATION;
785
786typedef
787_Function_class_(EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION)
790VOID
792EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION(
793 _In_
794 WDFDEVICE Device,
795 _In_
797 );
798
799typedef EVT_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION *PFN_WDF_DEVICE_POWER_STATE_CHANGE_NOTIFICATION;
800
801typedef
802_Function_class_(EVT_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION)
805VOID
807EVT_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION(
808 _In_
809 WDFDEVICE Device,
810 _In_
812 );
813
814typedef EVT_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION *PFN_WDF_DEVICE_POWER_POLICY_STATE_CHANGE_NOTIFICATION;
815
816#define IdleTimeoutDefaultValue ((ULONG) IdleTimeoutDefaultConstant)
817
818typedef
819_Function_class_(EVT_WDF_DEVICE_D0_ENTRY)
824EVT_WDF_DEVICE_D0_ENTRY(
825 _In_
826 WDFDEVICE Device,
827 _In_
829 );
830
831typedef EVT_WDF_DEVICE_D0_ENTRY *PFN_WDF_DEVICE_D0_ENTRY;
832
833typedef
834_Function_class_(EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED)
839EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED(
840 _In_
841 WDFDEVICE Device,
842 _In_
844 );
845
846typedef EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED *PFN_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED;
847
848typedef
849_Function_class_(EVT_WDF_DEVICE_D0_EXIT)
854EVT_WDF_DEVICE_D0_EXIT(
855 _In_
856 WDFDEVICE Device,
857 _In_
859 );
860
861typedef EVT_WDF_DEVICE_D0_EXIT *PFN_WDF_DEVICE_D0_EXIT;
862
863typedef
864_Function_class_(EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED)
869EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED(
870 _In_
871 WDFDEVICE Device,
872 _In_
874 );
875
876typedef EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED *PFN_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED;
877
878typedef
879_Function_class_(EVT_WDF_DEVICE_PREPARE_HARDWARE)
884EVT_WDF_DEVICE_PREPARE_HARDWARE(
885 _In_
886 WDFDEVICE Device,
887 _In_
888 WDFCMRESLIST ResourcesRaw,
889 _In_
891 );
892
893typedef EVT_WDF_DEVICE_PREPARE_HARDWARE *PFN_WDF_DEVICE_PREPARE_HARDWARE;
894
895typedef
896_Function_class_(EVT_WDF_DEVICE_RELEASE_HARDWARE)
901EVT_WDF_DEVICE_RELEASE_HARDWARE(
902 _In_
903 WDFDEVICE Device,
904 _In_
905 WDFCMRESLIST ResourcesTranslated
906 );
907
908typedef EVT_WDF_DEVICE_RELEASE_HARDWARE *PFN_WDF_DEVICE_RELEASE_HARDWARE;
909
910typedef
911_Function_class_(EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP)
914VOID
916EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP(
917 _In_
918 WDFDEVICE Device
919 );
920
921typedef EVT_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP *PFN_WDF_DEVICE_SELF_MANAGED_IO_CLEANUP;
922
923typedef
924_Function_class_(EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH)
927VOID
929EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH(
930 _In_
931 WDFDEVICE Device
932 );
933
934typedef EVT_WDF_DEVICE_SELF_MANAGED_IO_FLUSH *PFN_WDF_DEVICE_SELF_MANAGED_IO_FLUSH;
935
936typedef
937_Function_class_(EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT)
942EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT(
943 _In_
944 WDFDEVICE Device
945 );
946
947typedef EVT_WDF_DEVICE_SELF_MANAGED_IO_INIT *PFN_WDF_DEVICE_SELF_MANAGED_IO_INIT;
948
949typedef
950_Function_class_(EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND)
955EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND(
956 _In_
957 WDFDEVICE Device
958 );
959
960typedef EVT_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND *PFN_WDF_DEVICE_SELF_MANAGED_IO_SUSPEND;
961
962typedef
963_Function_class_(EVT_WDF_DEVICE_SELF_MANAGED_IO_RESTART)
968EVT_WDF_DEVICE_SELF_MANAGED_IO_RESTART(
969 _In_
970 WDFDEVICE Device
971 );
972
973typedef EVT_WDF_DEVICE_SELF_MANAGED_IO_RESTART *PFN_WDF_DEVICE_SELF_MANAGED_IO_RESTART;
974
975typedef
976_Function_class_(EVT_WDF_DEVICE_QUERY_STOP)
981EVT_WDF_DEVICE_QUERY_STOP(
982 _In_
983 WDFDEVICE Device
984 );
985
986typedef EVT_WDF_DEVICE_QUERY_STOP *PFN_WDF_DEVICE_QUERY_STOP;
987
988typedef
989_Function_class_(EVT_WDF_DEVICE_QUERY_REMOVE)
994EVT_WDF_DEVICE_QUERY_REMOVE(
995 _In_
996 WDFDEVICE Device
997 );
998
999typedef EVT_WDF_DEVICE_QUERY_REMOVE *PFN_WDF_DEVICE_QUERY_REMOVE;
1000
1001typedef
1002_Function_class_(EVT_WDF_DEVICE_SURPRISE_REMOVAL)
1005VOID
1006STDCALL
1007EVT_WDF_DEVICE_SURPRISE_REMOVAL(
1008 _In_
1009 WDFDEVICE Device
1010 );
1011
1012typedef EVT_WDF_DEVICE_SURPRISE_REMOVAL *PFN_WDF_DEVICE_SURPRISE_REMOVAL;
1013
1014typedef
1015_Function_class_(EVT_WDF_DEVICE_USAGE_NOTIFICATION)
1018VOID
1019STDCALL
1020EVT_WDF_DEVICE_USAGE_NOTIFICATION(
1021 _In_
1022 WDFDEVICE Device,
1023 _In_
1025 _In_
1027 );
1028
1029typedef EVT_WDF_DEVICE_USAGE_NOTIFICATION *PFN_WDF_DEVICE_USAGE_NOTIFICATION;
1030
1031typedef
1032_Function_class_(EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX)
1036STDCALL
1037EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX(
1038 _In_
1039 WDFDEVICE Device,
1040 _In_
1042 _In_
1044 );
1045
1046typedef EVT_WDF_DEVICE_USAGE_NOTIFICATION_EX *PFN_WDF_DEVICE_USAGE_NOTIFICATION_EX;
1047
1048typedef
1049_Function_class_(EVT_WDF_DEVICE_RELATIONS_QUERY)
1052VOID
1053STDCALL
1054EVT_WDF_DEVICE_RELATIONS_QUERY(
1055 _In_
1056 WDFDEVICE Device,
1057 _In_
1059 );
1060
1061typedef EVT_WDF_DEVICE_RELATIONS_QUERY *PFN_WDF_DEVICE_RELATIONS_QUERY;
1062
1063typedef
1064_Function_class_(EVT_WDF_DEVICE_ARM_WAKE_FROM_S0)
1068STDCALL
1069EVT_WDF_DEVICE_ARM_WAKE_FROM_S0(
1070 _In_
1071 WDFDEVICE Device
1072 );
1073
1074typedef EVT_WDF_DEVICE_ARM_WAKE_FROM_S0 *PFN_WDF_DEVICE_ARM_WAKE_FROM_S0;
1075
1076typedef
1077_Function_class_(EVT_WDF_DEVICE_ARM_WAKE_FROM_SX)
1081STDCALL
1082EVT_WDF_DEVICE_ARM_WAKE_FROM_SX(
1083 _In_
1084 WDFDEVICE Device
1085 );
1086
1087typedef EVT_WDF_DEVICE_ARM_WAKE_FROM_SX *PFN_WDF_DEVICE_ARM_WAKE_FROM_SX;
1088
1089typedef
1090_Function_class_(EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON)
1094STDCALL
1095EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON(
1096 _In_
1097 WDFDEVICE Device,
1098 _In_
1100 _In_
1102 );
1103
1104typedef EVT_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON *PFN_WDF_DEVICE_ARM_WAKE_FROM_SX_WITH_REASON;
1105
1106typedef
1107_Function_class_(EVT_WDF_DEVICE_DISARM_WAKE_FROM_S0)
1110VOID
1111STDCALL
1112EVT_WDF_DEVICE_DISARM_WAKE_FROM_S0(
1113 _In_
1114 WDFDEVICE Device
1115 );
1116
1117typedef EVT_WDF_DEVICE_DISARM_WAKE_FROM_S0 *PFN_WDF_DEVICE_DISARM_WAKE_FROM_S0;
1118
1119typedef
1120_Function_class_(EVT_WDF_DEVICE_DISARM_WAKE_FROM_SX)
1123VOID
1124STDCALL
1125EVT_WDF_DEVICE_DISARM_WAKE_FROM_SX(
1126 _In_
1127 WDFDEVICE Device
1128 );
1129
1130typedef EVT_WDF_DEVICE_DISARM_WAKE_FROM_SX *PFN_WDF_DEVICE_DISARM_WAKE_FROM_SX;
1131
1132typedef
1133_Function_class_(EVT_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED)
1136VOID
1137STDCALL
1138EVT_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED(
1139 _In_
1140 WDFDEVICE Device
1141 );
1142
1143typedef EVT_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED *PFN_WDF_DEVICE_WAKE_FROM_S0_TRIGGERED;
1144
1145typedef
1146_Function_class_(EVT_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED)
1149VOID
1150STDCALL
1151EVT_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED(
1152 _In_
1153 WDFDEVICE Device
1154 );
1155
1156typedef EVT_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED *PFN_WDF_DEVICE_WAKE_FROM_SX_TRIGGERED;
1157
1159 //
1160 // Size of this structure in bytes
1161 //
1163
1182
1184 //
1185 // Size of this structure in bytes
1186 //
1188
1192
1196
1198
1200
1202VOID
1205 )
1206{
1208
1210}
1211
1213VOID
1216 )
1217{
1220}
1221
1222
1224ULONG
1227 )
1228{
1229 return State & ~WdfDevStateNP;
1230}
1231
1232
1234BOOLEAN
1237 )
1238{
1239 return (State & WdfDevStateNP) ? TRUE : FALSE;
1240}
1241
1247
1249 //
1250 // Size of this structure in bytes
1251 //
1253
1254 //
1255 // Indicates whether the device can wake itself up while the machine is in
1256 // S0.
1257 //
1259
1260 //
1261 // The low power state in which the device will be placed when it is idled
1262 // out while the machine is in S0.
1263 //
1265
1266 //
1267 // Amount of time the device must be idle before idling out. Timeout is in
1268 // milliseconds.
1269 //
1271
1272 //
1273 // Inidcates whether a user can control the idle policy of the device.
1274 // By default, a user is allowed to change the policy.
1275 //
1277
1278 //
1279 // If WdfTrue, idling out while the machine is in S0 will be enabled.
1280 //
1281 // If WdfFalse, idling out will be disabled.
1282 //
1283 // If WdfUseDefault, the idling out will be enabled. If
1284 // UserControlOfIdleSettings is set to IdleAllowUserControl, the user's
1285 // settings will override the default.
1286 //
1288
1289 //
1290 // This field is applicable only when IdleCaps == IdleCannotWakeFromS0
1291 // If WdfTrue,device is powered up on System Wake even if device is idle
1292 // If WdfFalse, device is not powered up on system wake if it is idle
1293 // If WdfUseDefault, the behavior is same as WdfFalse
1294 //
1296
1297 //
1298 // This field determines how the IdleTimeout field is used.
1299 //
1300 // If the value is DriverManagedIdleTimeout, then the idle timeout value
1301 // is determined by the IdleTimeout field of this structure.
1302 //
1303 // If the value is SystemManagedIdleTimeout, then the timeout value is
1304 // determined by the power framework (PoFx) on operating systems where
1305 // the PoFx is available (i.e. Windows 8 and later). The IdleTimeout field
1306 // is ignored on these operating systems. On operating systems where the
1307 // PoFx is not available, the behavior is same as DriverManagedIdleTimeout.
1308 //
1309 // If the value is SystemManagedIdleTimeoutWithHint, then the timeout value
1310 // is determined by the power framework (PoFx) on operating systems where
1311 // the PoFx is available (i.e. Windows 8 and later). In addition, the value
1312 // specified in the IdleTimeout field is provided as a hint to the PoFx in
1313 // determining when the device should be allowed to enter a low-power state.
1314 // Since it is only a hint, the actual duration after which the PoFx allows
1315 // the device to enter a low-power state might be greater than or less than
1316 // the IdleTimeout value. On operating systems where the PoFx is not
1317 // available, the behavior is same as DriverManagedIdleTimeout.
1318 //
1320
1321 //
1322 // This field forces the device to avoid idling in the D3cold power state.
1323 // WDF will ensure, with help from the bus drivers, that the device will
1324 // idle in a D-state that can successfully generate a wake signal, if
1325 // necessary. If the client specifies that DxState == PowerDeviceD3, this
1326 // setting allows the client to distinguish betwen D3hot and D3cold. If
1327 // the client sets DxState == PowerDeviceMaximum, then WDF will pick the
1328 // deepest idle state identified by the bus driver. If that deepest state
1329 // is D3cold, this field allows the client to override that and choose
1330 // D3hot.
1331 //
1332 // If WdfTrue, device will not use D3cold in S0.
1333 // If WdfFalse, device will use D3cold in S0 if the ACPI firmware indicates
1334 // that the device can enter that state, if DxState above does not
1335 // specify some other D-state and, if the device is armed for
1336 // wake, that it can generate its wake signal from D3cold.
1337 // If WdfUseDefault, this setting will be derived from the driver's INF,
1338 // specifically the presence or absence of the following two lines in
1339 // the DDInstall.HW section:
1340 // Include=machine.inf
1341 // Needs=PciD3ColdSupported
1342 //
1344
1346
1348VOID
1352 )
1353{
1355
1357
1358 Settings->IdleTimeout = IdleTimeoutDefaultValue;
1359 Settings->UserControlOfIdleSettings = IdleAllowUserControl;
1360 Settings->Enabled = WdfUseDefault;
1361 Settings->PowerUpIdleDeviceOnSystemWake = WdfUseDefault;
1362 Settings->IdleTimeoutType = DriverManagedIdleTimeout;
1363 Settings->ExcludeD3Cold = WdfUseDefault;
1364
1365 Settings->IdleCaps = IdleCaps;
1366
1367 switch (IdleCaps) {
1369 case IdleCanWakeFromS0:
1370 Settings->DxState = PowerDeviceMaximum;
1371 break;
1372
1374 Settings->DxState = PowerDeviceD3;
1375 break;
1376 }
1377}
1378
1380 //
1381 // Size of this structure in bytes
1382 //
1384
1385 //
1386 // The low power state in which the device will be placed when it is armed
1387 // for wake from Sx.
1388 //
1390
1391 //
1392 // Inidcates whether a user can control the idle policy of the device.
1393 // By default, a user is allowed to change the policy.
1394 //
1396
1397 //
1398 // If WdfTrue, arming the device for wake while the machine is in Sx is
1399 // enabled.
1400 //
1401 // If WdfFalse, arming the device for wake while the machine is in Sx is
1402 // disabled.
1403 //
1404 // If WdfUseDefault, arming will be enabled. If UserControlOfWakeSettings
1405 // is set to WakeAllowUserControl, the user's settings will override the
1406 // default.
1407 //
1409
1410 //
1411 // If set to TRUE, arming the parent device can depend on whether there
1412 // is atleast one child device armed for wake.
1413 //
1414 // If set to FALSE, arming of the parent device will be independent of
1415 // whether any of the child devices are armed for wake.
1416 //
1418
1419 //
1420 // Indicates that whenever the parent device completes the wake irp
1421 // successfully, the status needs to be also propagated to the child
1422 // devices. This helps in tracking which devices were responsible for
1423 // waking the system.
1424 //
1426
1428
1430VOID
1433 )
1434{
1436
1438
1439 Settings->Enabled = WdfUseDefault;
1440 Settings->DxState = PowerDeviceMaximum;
1441 Settings->UserControlOfWakeSettings = WakeAllowUserControl;
1442}
1443
1444typedef struct _WDF_DEVICE_STATE {
1445 //
1446 // Size of this structure in bytes
1447 //
1449
1450 //
1451 // If set to WdfTrue, the device will be disabled
1452 //
1454
1455 //
1456 // If set to WdfTrue, the device will not be displayed in device manager.
1457 // Once hidden, the device cannot be unhidden.
1458 //
1460
1461 //
1462 // If set to WdfTrue, the device is reporting itself as failed. If set
1463 // in conjuction with ResourcesChanged to WdfTrue, the device will receive
1464 // a PnP stop and then a new PnP start device.
1465 //
1467
1468 //
1469 // If set to WdfTrue, the device cannot be subsequently disabled.
1470 //
1472
1473
1474 //
1475 // If set to WdfTrue, the device stack will be torn down.
1476 //
1478
1479 //
1480 // If set to WdfTrue, the device will be sent another PnP start. If the
1481 // Failed field is set to WdfTrue as well, a PnP stop will be sent before
1482 // the start.
1483 //
1485
1487
1489VOID
1491 _Out_ PWDF_DEVICE_STATE PnpDeviceState
1492 )
1493{
1494 RtlZeroMemory(PnpDeviceState, sizeof(WDF_DEVICE_STATE));
1495
1496 PnpDeviceState->Size = sizeof(WDF_DEVICE_STATE);
1497
1498 //
1499 // Initializes all of the fields to the WdfUseDefault enum value
1500 //
1501 PnpDeviceState->Disabled = WdfUseDefault;
1502 PnpDeviceState->DontDisplayInUI = WdfUseDefault;
1503 PnpDeviceState->Failed = WdfUseDefault;
1504 PnpDeviceState->NotDisableable = WdfUseDefault;
1505 PnpDeviceState->Removed = WdfUseDefault;
1506 PnpDeviceState->ResourcesChanged = WdfUseDefault;
1507}
1508
1510 //
1511 // Size of the structure in bytes
1512 //
1514
1515 //
1516 // NOTE: To mark a PDO as raw, call WdfPdoInitAssignRawDevice
1517 //
1518
1528
1529 //
1530 // Default values of -1 indicate not to set this value
1531 //
1534
1536
1538VOID
1541 )
1542{
1544
1545 Caps->Size = sizeof(WDF_DEVICE_PNP_CAPABILITIES);
1546
1547 Caps->LockSupported = WdfUseDefault;
1548 Caps->EjectSupported = WdfUseDefault;
1549 Caps->Removable = WdfUseDefault;
1550 Caps->DockDevice = WdfUseDefault;
1551 Caps->UniqueID = WdfUseDefault;
1552 Caps->SilentInstall = WdfUseDefault;
1553 Caps->SurpriseRemovalOK = WdfUseDefault;
1554 Caps->HardwareDisabled = WdfUseDefault;
1555 Caps->NoDisplayInUI = WdfUseDefault;
1556
1557 Caps->Address = (ULONG) -1;
1558 Caps->UINumber = (ULONG) -1;
1559}
1560
1562 //
1563 // Size of the structure in bytes
1564 //
1566
1569
1574
1575 //
1576 // Default value PowerDeviceMaximum indicates not to set this value
1577 //
1579
1580 //
1581 // Default value PowerDeviceMaximum, PowerSystemMaximum indicates not to
1582 // set this value.
1583 //
1586
1587 //
1588 // Default values of -1 indicate not to set this value
1589 //
1593
1594 //
1595 // Ideal Dx state for the device to be put into when the machine moves into
1596 // Sx and the device is not armed for wake. By default, the default will be
1597 // placed into D3. If IdealDxStateForSx is lighter then
1598 // DeviceState[Sx], then DeviceState[Sx] will be used as the Dx state.
1599 //
1601
1603
1605VOID
1608 )
1609{
1610 ULONG i;
1611
1613
1614 Caps->Size = sizeof(WDF_DEVICE_POWER_CAPABILITIES);
1615
1616 Caps->DeviceD1 = WdfUseDefault;
1617 Caps->DeviceD2 = WdfUseDefault;
1618
1619 Caps->WakeFromD0 = WdfUseDefault;
1620 Caps->WakeFromD1 = WdfUseDefault;
1621 Caps->WakeFromD2 = WdfUseDefault;
1622 Caps->WakeFromD3 = WdfUseDefault;
1623
1624 for (i = 0; i < sizeof(Caps->DeviceState)/sizeof(Caps->DeviceState[1]); i++) {
1625 Caps->DeviceState[i] = PowerDeviceMaximum;
1626 }
1627
1628 Caps->DeviceWake = PowerDeviceMaximum;
1629 Caps->SystemWake = PowerSystemMaximum;
1630
1631 Caps->D1Latency = (ULONG) -1;
1632 Caps->D2Latency = (ULONG) -1;
1633 Caps->D3Latency = (ULONG) -1;
1634
1635 Caps->IdealDxStateForSx = PowerDeviceMaximum;
1636}
1637
1641
1643 //
1644 // Size of the structure in bytes
1645 //
1647
1648 //
1649 // Bit field combination of values from the WDF_REMOVE_LOCK_OPTIONS_FLAGS
1650 // enumeration
1651 //
1654
1655
1656//
1657// Default remove lock options initialization macro
1658//
1660VOID
1664 )
1665{
1667
1669 RemoveLockOptions->Flags = Flags;
1670}
1671
1672typedef
1673_Function_class_(EVT_WDFDEVICE_WDM_IRP_PREPROCESS)
1677STDCALL
1678EVT_WDFDEVICE_WDM_IRP_PREPROCESS(
1679 _In_
1680 WDFDEVICE Device,
1681 _Inout_
1683 );
1684
1685typedef EVT_WDFDEVICE_WDM_IRP_PREPROCESS *PFN_WDFDEVICE_WDM_IRP_PREPROCESS;
1686
1687typedef
1688_Function_class_(EVT_WDFDEVICE_WDM_IRP_DISPATCH)
1692STDCALL
1693EVT_WDFDEVICE_WDM_IRP_DISPATCH(
1694 _In_
1695 WDFDEVICE Device,
1696 _In_
1698 _In_
1700 _In_
1702 _In_
1704 _Inout_
1705 PIRP Irp,
1706 _In_
1708 );
1709
1710typedef EVT_WDFDEVICE_WDM_IRP_DISPATCH *PFN_WDFDEVICE_WDM_IRP_DISPATCH;
1711
1712//
1713// This is called to pre-process a request using METHOD_NEITHER
1714//
1715typedef
1716_Function_class_(EVT_WDF_IO_IN_CALLER_CONTEXT)
1719VOID
1720STDCALL
1721EVT_WDF_IO_IN_CALLER_CONTEXT(
1722 _In_
1723 WDFDEVICE Device,
1724 _In_
1725 WDFREQUEST Request
1726 );
1727
1728typedef EVT_WDF_IO_IN_CALLER_CONTEXT *PFN_WDF_IO_IN_CALLER_CONTEXT;
1729
1730typedef
1731_Function_class_(EVT_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE)
1735STDCALL
1736EVT_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE(
1737 _In_
1738 WDFDEVICE Device,
1739 _In_
1740 POHANDLE PoHandle
1741 );
1742
1743typedef EVT_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE *PFN_WDFDEVICE_WDM_POST_PO_FX_REGISTER_DEVICE;
1744
1745typedef
1746_Function_class_(EVT_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE)
1749VOID
1750STDCALL
1751EVT_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE(
1752 _In_
1753 WDFDEVICE Device,
1754 _In_
1755 POHANDLE PoHandle
1756 );
1757
1758typedef EVT_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE *PFN_WDFDEVICE_WDM_PRE_PO_FX_UNREGISTER_DEVICE;
1759
1761 //
1762 // Size of the structure, in bytes.
1763 //
1765
1766 //
1767 // Client driver's callback function that is invoked after KMDF has
1768 // registered with the power framework. This field can be NULL if the
1769 // client driver does not wish to specify this callback.
1770 //
1772
1773 //
1774 // Client driver's callback function that is invoked before KMDF
1775 // unregisters with the power framework. This field can be NULL if the
1776 // client driver does not wish to specify this callback.
1777 //
1779
1780 //
1781 // Pointer to a PO_FX_COMPONENT structure that describes the only component
1782 // in the single-component device. This field can be NULL if the client
1783 // driver wants KMDF to use the default specification for this component
1784 // (i.e. support for F0 only).
1785 //
1787
1788 //
1789 // Client driver's PO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK callback
1790 // function. This field can be NULL if the client driver does not wish to
1791 // specify this callback.
1792 //
1794
1795 //
1796 // Client driver's PO_FX_COMPONENT_IDLE_CONDITION_CALLBACK callback
1797 // function. This field can be NULL if the client driver does not wish to
1798 // specify this callback.
1799 //
1801
1802 //
1803 // Client driver's PO_FX_COMPONENT_IDLE_STATE_CALLBACK callback function.
1804 // This field can be NULL if the client driver does not wish to specify
1805 // this callback.
1806 //
1808
1809 //
1810 // Client driver's PO_FX_POWER_CONTROL_CALLBACK callback function. This
1811 // field can be NULL if the client driver does not wish to specify this
1812 // callback.
1813 //
1815
1816 //
1817 // Context value that is passed in to the ComponentIdleStateCallback and
1818 // PowerControlCallback callback functions.
1819 //
1822
1824VOID
1827 )
1828{
1832}
1833
1834
1835typedef struct _WDF_IO_TYPE_CONFIG {
1836 //
1837 // Size of this structure in bytes
1838 //
1840
1841 //
1842 // <KMDF_DOC/>
1843 // Identifies the method that the driver will use to access data buffers
1844 // that it receives for read and write requests.
1845 //
1846 // <UMDF_DOC/>
1847 // Identifies the method that the driver will "prefer" to use to access data
1848 // buffers that it receives for read and write requests. Note that UMDF
1849 // driver provides just a preference, and not a guarantee.Therefore,
1850 // even if a driver specified direct access method, UMDF might use the
1851 // buffered access method for one or more of the device's requests to
1852 // improve performance. For example, UMDF uses buffered access for small
1853 // buffers, if it can copy the data to the driver's buffer faster than it
1854 // can map the buffers for direct access.
1855 //
1857
1858 //
1859 // <UMDF_ONLY/>
1860 // Identifies the method that the driver will "prefer" to use to access data
1861 // buffers that it receives for IOCTL requests. Note that UMDF
1862 // driver provides just a preference, and not a guarantee. Therefore,
1863 // even if a driver specified direct access method, UMDF might use the
1864 // buffered access method for one or more of the device's requests to
1865 // improve performance. For example, UMDF uses buffered access for small
1866 // buffers, if it can copy the data to the driver's buffer faster than it
1867 // can map the buffers for direct access.
1868 //
1870
1871 //
1872 // <UMDF_ONLY/>
1873 // Optional, Provides the smallest buffer size (in bytes) for which
1874 // UMDF will use direct access for the buffers. For example, set
1875 // DirectTransferThreshold to "12288" to indicate that UMDF should use buffered
1876 // access for all buffers that are smaller than 12 kilobytes, and direct
1877 // access for buffers equal to or greater than that. Typically, you
1878 // do not need to provide this value because UMDF uses a value that provides
1879 // the best performance. Note that there are other requirements that must be
1880 // met in order to get direct access of buffers. See Docs for details.
1881 //
1883
1885
1887VOID
1890 )
1891{
1893 IoTypeConfig->Size = sizeof(WDF_IO_TYPE_CONFIG);
1894 IoTypeConfig->ReadWriteIoType = WdfDeviceIoBuffered;
1895 IoTypeConfig->DeviceControlIoType = WdfDeviceIoBuffered;
1896}
1897
1898
1899
1900
1901
1903 //
1904 // Size of this structure
1905 //
1907
1908 //
1909 // A pointer to a DEVPROPKEY structure that specifies the device
1910 // property key.
1911 //
1913
1914 //
1915 // A locale identifier. Set this parameter either to a language-specific
1916 // LCID value or to LOCALE_NEUTRAL. The LOCALE_NEUTRAL LCID specifies
1917 // that the property is language-neutral (that is, not specific to any
1918 // language). Do not set this parameter to LOCALE_SYSTEM_DEFAULT or
1919 // LOCALE_USER_DEFAULT. For more information about language-specific
1920 // LCID values, see LCID Structure.
1921 //
1923
1924 //
1925 // Set this parameter to PLUGPLAY_PROPERTY_PERSISTENT if the property
1926 // value set by this routine should persist across computer restarts.
1927 // Otherwise, set Flags to zero. Ignored for Query DDIs.
1928 //
1930
1932
1934VOID
1938 )
1939{
1941
1942 PropertyData->Size = sizeof(*PropertyData);
1943 PropertyData->PropertyKey = PropertyKey;
1944}
1945
1946//
1947// VOID
1948// WdfDeviceStopIdle(
1949// _In_ WDFDEVICE Device,
1950// _In_ BOOLEAN WaitForD0
1951// );
1952//
1953// VOID
1954// WdfDeviceStopIdleWithTag(
1955// _In_ WDFDEVICE Device,
1956// _In_ BOOLEAN WaitForD0,
1957// _In_ PVOID Tag
1958// );
1959//
1960// VOID
1961// WdfDeviceResumeIdle(
1962// _In_ WDFDEVICE Device
1963// );
1964//
1965// VOID
1966// WdfDeviceResumeIdleWithTag(
1967// _In_ WDFDEVICE Device
1968// _In_ PVOID Tag
1969// );
1970//
1971#define WdfDeviceStopIdle(Device, WaitForD0) \
1972 WdfDeviceStopIdleWithTag(Device, WaitForD0, NULL)
1973
1974#define WdfDeviceStopIdleWithTag(Device, WaitForD0, Tag) \
1975 WdfDeviceStopIdleActual(Device, WaitForD0, Tag, __LINE__, __FILE__)
1976
1977#define WdfDeviceResumeIdle(Device) \
1978 WdfDeviceResumeIdleWithTag(Device, NULL)
1979
1980#define WdfDeviceResumeIdleWithTag(Device, Tag) \
1981 WdfDeviceResumeIdleActual(Device, Tag, __LINE__, __FILE__)
1982
1983
1984
1985//
1986// WDF Function: WdfDeviceGetDeviceState
1987//
1988typedef
1990WDFAPI
1991VOID
1992(STDCALL *PFN_WDFDEVICEGETDEVICESTATE)(
1993 _In_
1995 _In_
1996 WDFDEVICE Device,
1997 _Out_
1999 );
2000
2003VOID
2004WdfDeviceGetDeviceState(
2005 _In_
2006 WDFDEVICE Device,
2007 _Out_
2009 )
2010{
2012}
2013
2014//
2015// WDF Function: WdfDeviceSetDeviceState
2016//
2017typedef
2019WDFAPI
2020VOID
2021(STDCALL *PFN_WDFDEVICESETDEVICESTATE)(
2022 _In_
2024 _In_
2025 WDFDEVICE Device,
2026 _In_
2028 );
2029
2032VOID
2033WdfDeviceSetDeviceState(
2034 _In_
2035 WDFDEVICE Device,
2036 _In_
2038 )
2039{
2041}
2042
2043//
2044// WDF Function: WdfWdmDeviceGetWdfDeviceHandle
2045//
2046typedef
2048WDFAPI
2049WDFDEVICE
2050(STDCALL *PFN_WDFWDMDEVICEGETWDFDEVICEHANDLE)(
2051 _In_
2053 _In_
2055 );
2056
2059WDFDEVICE
2060WdfWdmDeviceGetWdfDeviceHandle(
2061 _In_
2063 )
2064{
2065 return ((PFN_WDFWDMDEVICEGETWDFDEVICEHANDLE) WdfFunctions[WdfWdmDeviceGetWdfDeviceHandleTableIndex])(WdfDriverGlobals, DeviceObject);
2066}
2067
2068//
2069// WDF Function: WdfDeviceWdmGetDeviceObject
2070//
2071typedef
2073WDFAPI
2075(STDCALL *PFN_WDFDEVICEWDMGETDEVICEOBJECT)(
2076 _In_
2078 _In_
2079 WDFDEVICE Device
2080 );
2081
2085WdfDeviceWdmGetDeviceObject(
2086 _In_
2087 WDFDEVICE Device
2088 )
2089{
2090 return ((PFN_WDFDEVICEWDMGETDEVICEOBJECT) WdfFunctions[WdfDeviceWdmGetDeviceObjectTableIndex])(WdfDriverGlobals, Device);
2091}
2092
2093//
2094// WDF Function: WdfDeviceWdmGetAttachedDevice
2095//
2096typedef
2098WDFAPI
2100(STDCALL *PFN_WDFDEVICEWDMGETATTACHEDDEVICE)(
2101 _In_
2103 _In_
2104 WDFDEVICE Device
2105 );
2106
2110WdfDeviceWdmGetAttachedDevice(
2111 _In_
2112 WDFDEVICE Device
2113 )
2114{
2115 return ((PFN_WDFDEVICEWDMGETATTACHEDDEVICE) WdfFunctions[WdfDeviceWdmGetAttachedDeviceTableIndex])(WdfDriverGlobals, Device);
2116}
2117
2118//
2119// WDF Function: WdfDeviceWdmGetPhysicalDevice
2120//
2121typedef
2123WDFAPI
2125(STDCALL *PFN_WDFDEVICEWDMGETPHYSICALDEVICE)(
2126 _In_
2128 _In_
2129 WDFDEVICE Device
2130 );
2131
2135WdfDeviceWdmGetPhysicalDevice(
2136 _In_
2137 WDFDEVICE Device
2138 )
2139{
2140 return ((PFN_WDFDEVICEWDMGETPHYSICALDEVICE) WdfFunctions[WdfDeviceWdmGetPhysicalDeviceTableIndex])(WdfDriverGlobals, Device);
2141}
2142
2143//
2144// WDF Function: WdfDeviceWdmDispatchPreprocessedIrp
2145//
2146typedef
2149WDFAPI
2151(STDCALL *PFN_WDFDEVICEWDMDISPATCHPREPROCESSEDIRP)(
2152 _In_
2154 _In_
2155 WDFDEVICE Device,
2156 _In_
2157 PIRP Irp
2158 );
2159
2164WdfDeviceWdmDispatchPreprocessedIrp(
2165 _In_
2166 WDFDEVICE Device,
2167 _In_
2168 PIRP Irp
2169 )
2170{
2171 return ((PFN_WDFDEVICEWDMDISPATCHPREPROCESSEDIRP) WdfFunctions[WdfDeviceWdmDispatchPreprocessedIrpTableIndex])(WdfDriverGlobals, Device, Irp);
2172}
2173
2174//
2175// WDF Function: WdfDeviceWdmDispatchIrp
2176//
2177typedef
2180WDFAPI
2182(STDCALL *PFN_WDFDEVICEWDMDISPATCHIRP)(
2183 _In_
2185 _In_
2186 WDFDEVICE Device,
2187 _In_
2188 PIRP Irp,
2189 _In_
2191 );
2192
2197WdfDeviceWdmDispatchIrp(
2198 _In_
2199 WDFDEVICE Device,
2200 _In_
2201 PIRP Irp,
2202 _In_
2204 )
2205{
2207}
2208
2209//
2210// WDF Function: WdfDeviceWdmDispatchIrpToIoQueue
2211//
2212typedef
2215WDFAPI
2217(STDCALL *PFN_WDFDEVICEWDMDISPATCHIRPTOIOQUEUE)(
2218 _In_
2220 _In_
2221 WDFDEVICE Device,
2222 _In_
2223 PIRP Irp,
2224 _In_
2225 WDFQUEUE Queue,
2226 _In_
2228 );
2229
2234WdfDeviceWdmDispatchIrpToIoQueue(
2235 _In_
2236 WDFDEVICE Device,
2237 _In_
2238 PIRP Irp,
2239 _In_
2240 WDFQUEUE Queue,
2241 _In_
2242 ULONG Flags
2243 )
2244{
2245 return ((PFN_WDFDEVICEWDMDISPATCHIRPTOIOQUEUE) WdfFunctions[WdfDeviceWdmDispatchIrpToIoQueueTableIndex])(WdfDriverGlobals, Device, Irp, Queue, Flags);
2246}
2247
2248//
2249// WDF Function: WdfDeviceAddDependentUsageDeviceObject
2250//
2251typedef
2254WDFAPI
2256(STDCALL *PFN_WDFDEVICEADDDEPENDENTUSAGEDEVICEOBJECT)(
2257 _In_
2259 _In_
2260 WDFDEVICE Device,
2261 _In_
2263 );
2264
2269WdfDeviceAddDependentUsageDeviceObject(
2270 _In_
2271 WDFDEVICE Device,
2272 _In_
2274 )
2275{
2276 return ((PFN_WDFDEVICEADDDEPENDENTUSAGEDEVICEOBJECT) WdfFunctions[WdfDeviceAddDependentUsageDeviceObjectTableIndex])(WdfDriverGlobals, Device, DependentDevice);
2277}
2278
2279//
2280// WDF Function: WdfDeviceRemoveDependentUsageDeviceObject
2281//
2282typedef
2284WDFAPI
2285VOID
2286(STDCALL *PFN_WDFDEVICEREMOVEDEPENDENTUSAGEDEVICEOBJECT)(
2287 _In_
2289 _In_
2290 WDFDEVICE Device,
2291 _In_
2293 );
2294
2297VOID
2298WdfDeviceRemoveDependentUsageDeviceObject(
2299 _In_
2300 WDFDEVICE Device,
2301 _In_
2303 )
2304{
2306}
2307
2308//
2309// WDF Function: WdfDeviceAddRemovalRelationsPhysicalDevice
2310//
2311typedef
2314WDFAPI
2316(STDCALL *PFN_WDFDEVICEADDREMOVALRELATIONSPHYSICALDEVICE)(
2317 _In_
2319 _In_
2320 WDFDEVICE Device,
2321 _In_
2323 );
2324
2329WdfDeviceAddRemovalRelationsPhysicalDevice(
2330 _In_
2331 WDFDEVICE Device,
2332 _In_
2334 )
2335{
2336 return ((PFN_WDFDEVICEADDREMOVALRELATIONSPHYSICALDEVICE) WdfFunctions[WdfDeviceAddRemovalRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
2337}
2338
2339//
2340// WDF Function: WdfDeviceRemoveRemovalRelationsPhysicalDevice
2341//
2342typedef
2344WDFAPI
2345VOID
2346(STDCALL *PFN_WDFDEVICEREMOVEREMOVALRELATIONSPHYSICALDEVICE)(
2347 _In_
2349 _In_
2350 WDFDEVICE Device,
2351 _In_
2353 );
2354
2357VOID
2358WdfDeviceRemoveRemovalRelationsPhysicalDevice(
2359 _In_
2360 WDFDEVICE Device,
2361 _In_
2363 )
2364{
2365 ((PFN_WDFDEVICEREMOVEREMOVALRELATIONSPHYSICALDEVICE) WdfFunctions[WdfDeviceRemoveRemovalRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
2366}
2367
2368//
2369// WDF Function: WdfDeviceClearRemovalRelationsDevices
2370//
2371typedef
2373WDFAPI
2374VOID
2375(STDCALL *PFN_WDFDEVICECLEARREMOVALRELATIONSDEVICES)(
2376 _In_
2378 _In_
2379 WDFDEVICE Device
2380 );
2381
2384VOID
2385WdfDeviceClearRemovalRelationsDevices(
2386 _In_
2387 WDFDEVICE Device
2388 )
2389{
2390 ((PFN_WDFDEVICECLEARREMOVALRELATIONSDEVICES) WdfFunctions[WdfDeviceClearRemovalRelationsDevicesTableIndex])(WdfDriverGlobals, Device);
2391}
2392
2393//
2394// WDF Function: WdfDeviceGetDriver
2395//
2396typedef
2398WDFAPI
2399WDFDRIVER
2400(STDCALL *PFN_WDFDEVICEGETDRIVER)(
2401 _In_
2403 _In_
2404 WDFDEVICE Device
2405 );
2406
2409WDFDRIVER
2410WdfDeviceGetDriver(
2411 _In_
2412 WDFDEVICE Device
2413 )
2414{
2415 return ((PFN_WDFDEVICEGETDRIVER) WdfFunctions[WdfDeviceGetDriverTableIndex])(WdfDriverGlobals, Device);
2416}
2417
2418//
2419// WDF Function: WdfDeviceRetrieveDeviceName
2420//
2421typedef
2424WDFAPI
2426(STDCALL *PFN_WDFDEVICERETRIEVEDEVICENAME)(
2427 _In_
2429 _In_
2430 WDFDEVICE Device,
2431 _In_
2432 WDFSTRING String
2433 );
2434
2439WdfDeviceRetrieveDeviceName(
2440 _In_
2441 WDFDEVICE Device,
2442 _In_
2443 WDFSTRING String
2444 )
2445{
2446 return ((PFN_WDFDEVICERETRIEVEDEVICENAME) WdfFunctions[WdfDeviceRetrieveDeviceNameTableIndex])(WdfDriverGlobals, Device, String);
2447}
2448
2449//
2450// WDF Function: WdfDeviceAssignMofResourceName
2451//
2452typedef
2455WDFAPI
2457(STDCALL *PFN_WDFDEVICEASSIGNMOFRESOURCENAME)(
2458 _In_
2460 _In_
2461 WDFDEVICE Device,
2462 _In_
2464 );
2465
2470WdfDeviceAssignMofResourceName(
2471 _In_
2472 WDFDEVICE Device,
2473 _In_
2475 )
2476{
2477 return ((PFN_WDFDEVICEASSIGNMOFRESOURCENAME) WdfFunctions[WdfDeviceAssignMofResourceNameTableIndex])(WdfDriverGlobals, Device, MofResourceName);
2478}
2479
2480//
2481// WDF Function: WdfDeviceGetIoTarget
2482//
2483typedef
2485WDFAPI
2486WDFIOTARGET
2487(STDCALL *PFN_WDFDEVICEGETIOTARGET)(
2488 _In_
2490 _In_
2491 WDFDEVICE Device
2492 );
2493
2496WDFIOTARGET
2497WdfDeviceGetIoTarget(
2498 _In_
2499 WDFDEVICE Device
2500 )
2501{
2502 return ((PFN_WDFDEVICEGETIOTARGET) WdfFunctions[WdfDeviceGetIoTargetTableIndex])(WdfDriverGlobals, Device);
2503}
2504
2505//
2506// WDF Function: WdfDeviceGetDevicePnpState
2507//
2508typedef
2510WDFAPI
2512(STDCALL *PFN_WDFDEVICEGETDEVICEPNPSTATE)(
2513 _In_
2515 _In_
2516 WDFDEVICE Device
2517 );
2518
2522WdfDeviceGetDevicePnpState(
2523 _In_
2524 WDFDEVICE Device
2525 )
2526{
2527 return ((PFN_WDFDEVICEGETDEVICEPNPSTATE) WdfFunctions[WdfDeviceGetDevicePnpStateTableIndex])(WdfDriverGlobals, Device);
2528}
2529
2530//
2531// WDF Function: WdfDeviceGetDevicePowerState
2532//
2533typedef
2535WDFAPI
2537(STDCALL *PFN_WDFDEVICEGETDEVICEPOWERSTATE)(
2538 _In_
2540 _In_
2541 WDFDEVICE Device
2542 );
2543
2547WdfDeviceGetDevicePowerState(
2548 _In_
2549 WDFDEVICE Device
2550 )
2551{
2552 return ((PFN_WDFDEVICEGETDEVICEPOWERSTATE) WdfFunctions[WdfDeviceGetDevicePowerStateTableIndex])(WdfDriverGlobals, Device);
2553}
2554
2555//
2556// WDF Function: WdfDeviceGetDevicePowerPolicyState
2557//
2558typedef
2560WDFAPI
2562(STDCALL *PFN_WDFDEVICEGETDEVICEPOWERPOLICYSTATE)(
2563 _In_
2565 _In_
2566 WDFDEVICE Device
2567 );
2568
2572WdfDeviceGetDevicePowerPolicyState(
2573 _In_
2574 WDFDEVICE Device
2575 )
2576{
2577 return ((PFN_WDFDEVICEGETDEVICEPOWERPOLICYSTATE) WdfFunctions[WdfDeviceGetDevicePowerPolicyStateTableIndex])(WdfDriverGlobals, Device);
2578}
2579
2580//
2581// WDF Function: WdfDeviceAssignS0IdleSettings
2582//
2583typedef
2586WDFAPI
2588(STDCALL *PFN_WDFDEVICEASSIGNS0IDLESETTINGS)(
2589 _In_
2591 _In_
2592 WDFDEVICE Device,
2593 _In_
2595 );
2596
2601WdfDeviceAssignS0IdleSettings(
2602 _In_
2603 WDFDEVICE Device,
2604 _In_
2606 )
2607{
2608 return ((PFN_WDFDEVICEASSIGNS0IDLESETTINGS) WdfFunctions[WdfDeviceAssignS0IdleSettingsTableIndex])(WdfDriverGlobals, Device, Settings);
2609}
2610
2611//
2612// WDF Function: WdfDeviceAssignSxWakeSettings
2613//
2614typedef
2617WDFAPI
2619(STDCALL *PFN_WDFDEVICEASSIGNSXWAKESETTINGS)(
2620 _In_
2622 _In_
2623 WDFDEVICE Device,
2624 _In_
2626 );
2627
2632WdfDeviceAssignSxWakeSettings(
2633 _In_
2634 WDFDEVICE Device,
2635 _In_
2637 )
2638{
2639 return ((PFN_WDFDEVICEASSIGNSXWAKESETTINGS) WdfFunctions[WdfDeviceAssignSxWakeSettingsTableIndex])(WdfDriverGlobals, Device, Settings);
2640}
2641
2642//
2643// WDF Function: WdfDeviceOpenRegistryKey
2644//
2645typedef
2648WDFAPI
2650(STDCALL *PFN_WDFDEVICEOPENREGISTRYKEY)(
2651 _In_
2653 _In_
2654 WDFDEVICE Device,
2655 _In_
2657 _In_
2659 _In_opt_
2661 _Out_
2662 WDFKEY* Key
2663 );
2664
2669WdfDeviceOpenRegistryKey(
2670 _In_
2671 WDFDEVICE Device,
2672 _In_
2674 _In_
2676 _In_opt_
2678 _Out_
2679 WDFKEY* Key
2680 )
2681{
2683}
2684
2685//
2686// WDF Function: WdfDeviceOpenDevicemapKey
2687//
2688typedef
2691WDFAPI
2693(STDCALL *PFN_WDFDEVICEOPENDEVICEMAPKEY)(
2694 _In_
2696 _In_
2697 WDFDEVICE Device,
2698 _In_
2700 _In_
2702 _In_opt_
2704 _Out_
2705 WDFKEY* Key
2706 );
2707
2712WdfDeviceOpenDevicemapKey(
2713 _In_
2714 WDFDEVICE Device,
2715 _In_
2717 _In_
2719 _In_opt_
2721 _Out_
2722 WDFKEY* Key
2723 )
2724{
2726}
2727
2728//
2729// WDF Function: WdfDeviceSetSpecialFileSupport
2730//
2731typedef
2733WDFAPI
2734VOID
2735(STDCALL *PFN_WDFDEVICESETSPECIALFILESUPPORT)(
2736 _In_
2738 _In_
2739 WDFDEVICE Device,
2740 _In_
2742 _In_
2744 );
2745
2748VOID
2749WdfDeviceSetSpecialFileSupport(
2750 _In_
2751 WDFDEVICE Device,
2752 _In_
2754 _In_
2756 )
2757{
2759}
2760
2761//
2762// WDF Function: WdfDeviceSetCharacteristics
2763//
2764typedef
2766WDFAPI
2767VOID
2768(STDCALL *PFN_WDFDEVICESETCHARACTERISTICS)(
2769 _In_
2771 _In_
2772 WDFDEVICE Device,
2773 _In_
2775 );
2776
2779VOID
2780WdfDeviceSetCharacteristics(
2781 _In_
2782 WDFDEVICE Device,
2783 _In_
2785 )
2786{
2788}
2789
2790//
2791// WDF Function: WdfDeviceGetCharacteristics
2792//
2793typedef
2795WDFAPI
2796ULONG
2797(STDCALL *PFN_WDFDEVICEGETCHARACTERISTICS)(
2798 _In_
2800 _In_
2801 WDFDEVICE Device
2802 );
2803
2806ULONG
2807WdfDeviceGetCharacteristics(
2808 _In_
2809 WDFDEVICE Device
2810 )
2811{
2812 return ((PFN_WDFDEVICEGETCHARACTERISTICS) WdfFunctions[WdfDeviceGetCharacteristicsTableIndex])(WdfDriverGlobals, Device);
2813}
2814
2815//
2816// WDF Function: WdfDeviceGetAlignmentRequirement
2817//
2818typedef
2820WDFAPI
2821ULONG
2822(STDCALL *PFN_WDFDEVICEGETALIGNMENTREQUIREMENT)(
2823 _In_
2825 _In_
2826 WDFDEVICE Device
2827 );
2828
2831ULONG
2832WdfDeviceGetAlignmentRequirement(
2833 _In_
2834 WDFDEVICE Device
2835 )
2836{
2837 return ((PFN_WDFDEVICEGETALIGNMENTREQUIREMENT) WdfFunctions[WdfDeviceGetAlignmentRequirementTableIndex])(WdfDriverGlobals, Device);
2838}
2839
2840//
2841// WDF Function: WdfDeviceSetAlignmentRequirement
2842//
2843typedef
2845WDFAPI
2846VOID
2847(STDCALL *PFN_WDFDEVICESETALIGNMENTREQUIREMENT)(
2848 _In_
2850 _In_
2851 WDFDEVICE Device,
2852 _In_
2854 );
2855
2858VOID
2859WdfDeviceSetAlignmentRequirement(
2860 _In_
2861 WDFDEVICE Device,
2862 _In_
2864 )
2865{
2867}
2868
2869//
2870// WDF Function: WdfDeviceInitFree
2871//
2872typedef
2874WDFAPI
2875VOID
2876(STDCALL *PFN_WDFDEVICEINITFREE)(
2877 _In_
2879 _In_
2881 );
2882
2885VOID
2886WdfDeviceInitFree(
2887 _In_
2889 )
2890{
2892}
2893
2894//
2895// WDF Function: WdfDeviceInitSetPnpPowerEventCallbacks
2896//
2897typedef
2899WDFAPI
2900VOID
2901(STDCALL *PFN_WDFDEVICEINITSETPNPPOWEREVENTCALLBACKS)(
2902 _In_
2904 _In_
2906 _In_
2908 );
2909
2912VOID
2913WdfDeviceInitSetPnpPowerEventCallbacks(
2914 _In_
2916 _In_
2918 )
2919{
2921}
2922
2923//
2924// WDF Function: WdfDeviceInitSetPowerPolicyEventCallbacks
2925//
2926typedef
2928WDFAPI
2929VOID
2930(STDCALL *PFN_WDFDEVICEINITSETPOWERPOLICYEVENTCALLBACKS)(
2931 _In_
2933 _In_
2935 _In_
2937 );
2938
2941VOID
2942WdfDeviceInitSetPowerPolicyEventCallbacks(
2943 _In_
2945 _In_
2947 )
2948{
2950}
2951
2952//
2953// WDF Function: WdfDeviceInitSetPowerPolicyOwnership
2954//
2955typedef
2957WDFAPI
2958VOID
2959(STDCALL *PFN_WDFDEVICEINITSETPOWERPOLICYOWNERSHIP)(
2960 _In_
2962 _In_
2964 _In_
2966 );
2967
2970VOID
2971WdfDeviceInitSetPowerPolicyOwnership(
2972 _In_
2974 _In_
2976 )
2977{
2979}
2980
2981//
2982// WDF Function: WdfDeviceInitRegisterPnpStateChangeCallback
2983//
2984typedef
2987WDFAPI
2989(STDCALL *PFN_WDFDEVICEINITREGISTERPNPSTATECHANGECALLBACK)(
2990 _In_
2992 _In_
2994 _In_
2996 _In_
2998 _In_
3000 );
3001
3006WdfDeviceInitRegisterPnpStateChangeCallback(
3007 _In_
3009 _In_
3011 _In_
3013 _In_
3015 )
3016{
3018}
3019
3020//
3021// WDF Function: WdfDeviceInitRegisterPowerStateChangeCallback
3022//
3023typedef
3026WDFAPI
3028(STDCALL *PFN_WDFDEVICEINITREGISTERPOWERSTATECHANGECALLBACK)(
3029 _In_
3031 _In_
3033 _In_
3035 _In_
3037 _In_
3039 );
3040
3045WdfDeviceInitRegisterPowerStateChangeCallback(
3046 _In_
3048 _In_
3050 _In_
3052 _In_
3054 )
3055{
3057}
3058
3059//
3060// WDF Function: WdfDeviceInitRegisterPowerPolicyStateChangeCallback
3061//
3062typedef
3065WDFAPI
3067(STDCALL *PFN_WDFDEVICEINITREGISTERPOWERPOLICYSTATECHANGECALLBACK)(
3068 _In_
3070 _In_
3072 _In_
3074 _In_
3076 _In_
3078 );
3079
3084WdfDeviceInitRegisterPowerPolicyStateChangeCallback(
3085 _In_
3087 _In_
3089 _In_
3091 _In_
3093 )
3094{
3096}
3097
3098//
3099// WDF Function: WdfDeviceInitSetExclusive
3100//
3101typedef
3103WDFAPI
3104VOID
3105(STDCALL *PFN_WDFDEVICEINITSETEXCLUSIVE)(
3106 _In_
3108 _In_
3110 _In_
3112 );
3113
3116VOID
3117WdfDeviceInitSetExclusive(
3118 _In_
3120 _In_
3122 )
3123{
3125}
3126
3127//
3128// WDF Function: WdfDeviceInitSetIoType
3129//
3130typedef
3132WDFAPI
3133VOID
3134(STDCALL *PFN_WDFDEVICEINITSETIOTYPE)(
3135 _In_
3137 _In_
3139 _In_
3141 );
3142
3145VOID
3146WdfDeviceInitSetIoType(
3147 _In_
3149 _In_
3151 )
3152{
3154}
3155
3156//
3157// WDF Function: WdfDeviceInitSetPowerNotPageable
3158//
3159typedef
3161WDFAPI
3162VOID
3163(STDCALL *PFN_WDFDEVICEINITSETPOWERNOTPAGEABLE)(
3164 _In_
3166 _In_
3168 );
3169
3172VOID
3173WdfDeviceInitSetPowerNotPageable(
3174 _In_
3176 )
3177{
3178 ((PFN_WDFDEVICEINITSETPOWERNOTPAGEABLE) WdfFunctions[WdfDeviceInitSetPowerNotPageableTableIndex])(WdfDriverGlobals, DeviceInit);
3179}
3180
3181//
3182// WDF Function: WdfDeviceInitSetPowerPageable
3183//
3184typedef
3186WDFAPI
3187VOID
3188(STDCALL *PFN_WDFDEVICEINITSETPOWERPAGEABLE)(
3189 _In_
3191 _In_
3193 );
3194
3197VOID
3198WdfDeviceInitSetPowerPageable(
3199 _In_
3201 )
3202{
3204}
3205
3206//
3207// WDF Function: WdfDeviceInitSetPowerInrush
3208//
3209typedef
3211WDFAPI
3212VOID
3213(STDCALL *PFN_WDFDEVICEINITSETPOWERINRUSH)(
3214 _In_
3216 _In_
3218 );
3219
3222VOID
3223WdfDeviceInitSetPowerInrush(
3224 _In_
3226 )
3227{
3229}
3230
3231//
3232// WDF Function: WdfDeviceInitSetDeviceType
3233//
3234typedef
3236WDFAPI
3237VOID
3238(STDCALL *PFN_WDFDEVICEINITSETDEVICETYPE)(
3239 _In_
3241 _In_
3243 _In_
3245 );
3246
3249VOID
3250WdfDeviceInitSetDeviceType(
3251 _In_
3253 _In_
3255 )
3256{
3258}
3259
3260//
3261// WDF Function: WdfDeviceInitAssignName
3262//
3263typedef
3266WDFAPI
3268(STDCALL *PFN_WDFDEVICEINITASSIGNNAME)(
3269 _In_
3271 _In_
3273 _In_opt_
3275 );
3276
3281WdfDeviceInitAssignName(
3282 _In_
3284 _In_opt_
3286 )
3287{
3288 return ((PFN_WDFDEVICEINITASSIGNNAME) WdfFunctions[WdfDeviceInitAssignNameTableIndex])(WdfDriverGlobals, DeviceInit, DeviceName);
3289}
3290
3291//
3292// WDF Function: WdfDeviceInitAssignSDDLString
3293//
3294typedef
3297WDFAPI
3299(STDCALL *PFN_WDFDEVICEINITASSIGNSDDLSTRING)(
3300 _In_
3302 _In_
3304 _In_opt_
3306 );
3307
3312WdfDeviceInitAssignSDDLString(
3313 _In_
3315 _In_opt_
3317 )
3318{
3319 return ((PFN_WDFDEVICEINITASSIGNSDDLSTRING) WdfFunctions[WdfDeviceInitAssignSDDLStringTableIndex])(WdfDriverGlobals, DeviceInit, SDDLString);
3320}
3321
3322//
3323// WDF Function: WdfDeviceInitSetDeviceClass
3324//
3325typedef
3327WDFAPI
3328VOID
3329(STDCALL *PFN_WDFDEVICEINITSETDEVICECLASS)(
3330 _In_
3332 _In_
3334 _In_
3336 );
3337
3340VOID
3341WdfDeviceInitSetDeviceClass(
3342 _In_
3344 _In_
3346 )
3347{
3349}
3350
3351//
3352// WDF Function: WdfDeviceInitSetCharacteristics
3353//
3354typedef
3356WDFAPI
3357VOID
3358(STDCALL *PFN_WDFDEVICEINITSETCHARACTERISTICS)(
3359 _In_
3361 _In_
3363 _In_
3365 _In_
3367 );
3368
3371VOID
3372WdfDeviceInitSetCharacteristics(
3373 _In_
3375 _In_
3377 _In_
3379 )
3380{
3382}
3383
3384//
3385// WDF Function: WdfDeviceInitSetFileObjectConfig
3386//
3387typedef
3389WDFAPI
3390VOID
3391(STDCALL *PFN_WDFDEVICEINITSETFILEOBJECTCONFIG)(
3392 _In_
3394 _In_
3396 _In_
3398 _In_opt_
3400 );
3401
3404VOID
3405WdfDeviceInitSetFileObjectConfig(
3406 _In_
3408 _In_
3410 _In_opt_
3412 )
3413{
3415}
3416
3417//
3418// WDF Function: WdfDeviceInitSetRequestAttributes
3419//
3420typedef
3422WDFAPI
3423VOID
3424(STDCALL *PFN_WDFDEVICEINITSETREQUESTATTRIBUTES)(
3425 _In_
3427 _In_
3429 _In_
3431 );
3432
3435VOID
3436WdfDeviceInitSetRequestAttributes(
3437 _In_
3439 _In_
3441 )
3442{
3444}
3445
3446//
3447// WDF Function: WdfDeviceInitAssignWdmIrpPreprocessCallback
3448//
3449typedef
3452WDFAPI
3454(STDCALL *PFN_WDFDEVICEINITASSIGNWDMIRPPREPROCESSCALLBACK)(
3455 _In_
3457 _In_
3459 _In_
3461 _In_
3466 _In_
3468 );
3469
3474WdfDeviceInitAssignWdmIrpPreprocessCallback(
3475 _In_
3477 _In_
3479 _In_
3484 _In_
3486 )
3487{
3489}
3490
3491//
3492// WDF Function: WdfDeviceInitSetIoInCallerContextCallback
3493//
3494typedef
3496WDFAPI
3497VOID
3498(STDCALL *PFN_WDFDEVICEINITSETIOINCALLERCONTEXTCALLBACK)(
3499 _In_
3501 _In_
3503 _In_
3505 );
3506
3509VOID
3510WdfDeviceInitSetIoInCallerContextCallback(
3511 _In_
3513 _In_
3515 )
3516{
3518}
3519
3520//
3521// WDF Function: WdfDeviceInitSetRemoveLockOptions
3522//
3523typedef
3525WDFAPI
3526VOID
3527(STDCALL *PFN_WDFDEVICEINITSETREMOVELOCKOPTIONS)(
3528 _In_
3530 _In_
3532 _In_
3534 );
3535
3538VOID
3539WdfDeviceInitSetRemoveLockOptions(
3540 _In_
3542 _In_
3544 )
3545{
3547}
3548
3549//
3550// WDF Function: WdfDeviceCreate
3551//
3552typedef
3555WDFAPI
3557(STDCALL *PFN_WDFDEVICECREATE)(
3558 _In_
3560 _Inout_
3562 _In_opt_
3564 _Out_
3565 WDFDEVICE* Device
3566 );
3567
3572WdfDeviceCreate(
3573 _Inout_
3575 _In_opt_
3577 _Out_
3578 WDFDEVICE* Device
3579 )
3580{
3582}
3583
3584//
3585// WDF Function: WdfDeviceSetStaticStopRemove
3586//
3587typedef
3589WDFAPI
3590VOID
3591(STDCALL *PFN_WDFDEVICESETSTATICSTOPREMOVE)(
3592 _In_
3594 _In_
3595 WDFDEVICE Device,
3596 _In_
3598 );
3599
3602VOID
3603WdfDeviceSetStaticStopRemove(
3604 _In_
3605 WDFDEVICE Device,
3606 _In_
3608 )
3609{
3611}
3612
3613//
3614// WDF Function: WdfDeviceCreateDeviceInterface
3615//
3616typedef
3619WDFAPI
3621(STDCALL *PFN_WDFDEVICECREATEDEVICEINTERFACE)(
3622 _In_
3624 _In_
3625 WDFDEVICE Device,
3626 _In_
3628 _In_opt_
3630 );
3631
3636WdfDeviceCreateDeviceInterface(
3637 _In_
3638 WDFDEVICE Device,
3639 _In_
3641 _In_opt_
3643 )
3644{
3646}
3647
3648//
3649// WDF Function: WdfDeviceSetDeviceInterfaceState
3650//
3651typedef
3653WDFAPI
3654VOID
3655(STDCALL *PFN_WDFDEVICESETDEVICEINTERFACESTATE)(
3656 _In_
3658 _In_
3659 WDFDEVICE Device,
3660 _In_
3662 _In_opt_
3664 _In_
3666 );
3667
3670VOID
3671WdfDeviceSetDeviceInterfaceState(
3672 _In_
3673 WDFDEVICE Device,
3674 _In_
3676 _In_opt_
3678 _In_
3680 )
3681{
3683}
3684
3685//
3686// WDF Function: WdfDeviceRetrieveDeviceInterfaceString
3687//
3688typedef
3691WDFAPI
3693(STDCALL *PFN_WDFDEVICERETRIEVEDEVICEINTERFACESTRING)(
3694 _In_
3696 _In_
3697 WDFDEVICE Device,
3698 _In_
3700 _In_opt_
3702 _In_
3703 WDFSTRING String
3704 );
3705
3710WdfDeviceRetrieveDeviceInterfaceString(
3711 _In_
3712 WDFDEVICE Device,
3713 _In_
3715 _In_opt_
3717 _In_
3718 WDFSTRING String
3719 )
3720{
3722}
3723
3724//
3725// WDF Function: WdfDeviceCreateSymbolicLink
3726//
3727typedef
3730WDFAPI
3732(STDCALL *PFN_WDFDEVICECREATESYMBOLICLINK)(
3733 _In_
3735 _In_
3736 WDFDEVICE Device,
3737 _In_
3739 );
3740
3745WdfDeviceCreateSymbolicLink(
3746 _In_
3747 WDFDEVICE Device,
3748 _In_
3750 )
3751{
3752 return ((PFN_WDFDEVICECREATESYMBOLICLINK) WdfFunctions[WdfDeviceCreateSymbolicLinkTableIndex])(WdfDriverGlobals, Device, SymbolicLinkName);
3753}
3754
3755//
3756// WDF Function: WdfDeviceQueryProperty
3757//
3758typedef
3761WDFAPI
3763(STDCALL *PFN_WDFDEVICEQUERYPROPERTY)(
3764 _In_
3766 _In_
3767 WDFDEVICE Device,
3768 _In_
3770 _In_
3774 _Out_
3776 );
3777
3782WdfDeviceQueryProperty(
3783 _In_
3784 WDFDEVICE Device,
3785 _In_
3787 _In_
3791 _Out_
3793 )
3794{
3796}
3797
3798//
3799// WDF Function: WdfDeviceAllocAndQueryProperty
3800//
3801typedef
3804WDFAPI
3806(STDCALL *PFN_WDFDEVICEALLOCANDQUERYPROPERTY)(
3807 _In_
3809 _In_
3810 WDFDEVICE Device,
3811 _In_
3813 _In_
3816 _In_opt_
3818 _Out_
3820 );
3821
3826WdfDeviceAllocAndQueryProperty(
3827 _In_
3828 WDFDEVICE Device,
3829 _In_
3831 _In_
3834 _In_opt_
3836 _Out_
3837 WDFMEMORY* PropertyMemory
3838 )
3839{
3841}
3842
3843//
3844// WDF Function: WdfDeviceSetPnpCapabilities
3845//
3846typedef
3848WDFAPI
3849VOID
3850(STDCALL *PFN_WDFDEVICESETPNPCAPABILITIES)(
3851 _In_
3853 _In_
3854 WDFDEVICE Device,
3855 _In_
3857 );
3858
3861VOID
3862WdfDeviceSetPnpCapabilities(
3863 _In_
3864 WDFDEVICE Device,
3865 _In_
3867 )
3868{
3870}
3871
3872//
3873// WDF Function: WdfDeviceSetPowerCapabilities
3874//
3875typedef
3877WDFAPI
3878VOID
3879(STDCALL *PFN_WDFDEVICESETPOWERCAPABILITIES)(
3880 _In_
3882 _In_
3883 WDFDEVICE Device,
3884 _In_
3886 );
3887
3890VOID
3891WdfDeviceSetPowerCapabilities(
3892 _In_
3893 WDFDEVICE Device,
3894 _In_
3896 )
3897{
3899}
3900
3901//
3902// WDF Function: WdfDeviceSetBusInformationForChildren
3903//
3904typedef
3906WDFAPI
3907VOID
3908(STDCALL *PFN_WDFDEVICESETBUSINFORMATIONFORCHILDREN)(
3909 _In_
3911 _In_
3912 WDFDEVICE Device,
3913 _In_
3915 );
3916
3919VOID
3920WdfDeviceSetBusInformationForChildren(
3921 _In_
3922 WDFDEVICE Device,
3923 _In_
3925 )
3926{
3928}
3929
3930//
3931// WDF Function: WdfDeviceIndicateWakeStatus
3932//
3933typedef
3936WDFAPI
3938(STDCALL *PFN_WDFDEVICEINDICATEWAKESTATUS)(
3939 _In_
3941 _In_
3942 WDFDEVICE Device,
3943 _In_
3945 );
3946
3951WdfDeviceIndicateWakeStatus(
3952 _In_
3953 WDFDEVICE Device,
3954 _In_
3956 )
3957{
3958 return ((PFN_WDFDEVICEINDICATEWAKESTATUS) WdfFunctions[WdfDeviceIndicateWakeStatusTableIndex])(WdfDriverGlobals, Device, WaitWakeStatus);
3959}
3960
3961//
3962// WDF Function: WdfDeviceSetFailed
3963//
3964typedef
3966WDFAPI
3967VOID
3968(STDCALL *PFN_WDFDEVICESETFAILED)(
3969 _In_
3971 _In_
3972 WDFDEVICE Device,
3973 _In_
3975 );
3976
3979VOID
3980WdfDeviceSetFailed(
3981 _In_
3982 WDFDEVICE Device,
3983 _In_
3985 )
3986{
3988}
3989
3990//
3991// WDF Function: WdfDeviceStopIdleNoTrack
3992//
3993typedef
3997WDFAPI
3999(STDCALL *PFN_WDFDEVICESTOPIDLENOTRACK)(
4000 _In_
4002 _In_
4003 WDFDEVICE Device,
4004 _In_
4006 );
4007
4013WdfDeviceStopIdleNoTrack(
4014 _In_
4015 WDFDEVICE Device,
4016 _In_
4018 )
4019{
4020 return ((PFN_WDFDEVICESTOPIDLENOTRACK) WdfFunctions[WdfDeviceStopIdleNoTrackTableIndex])(WdfDriverGlobals, Device, WaitForD0);
4021}
4022
4023//
4024// WDF Function: WdfDeviceResumeIdleNoTrack
4025//
4026typedef
4028WDFAPI
4029VOID
4030(STDCALL *PFN_WDFDEVICERESUMEIDLENOTRACK)(
4031 _In_
4033 _In_
4034 WDFDEVICE Device
4035 );
4036
4039VOID
4040WdfDeviceResumeIdleNoTrack(
4041 _In_
4042 WDFDEVICE Device
4043 )
4044{
4045 ((PFN_WDFDEVICERESUMEIDLENOTRACK) WdfFunctions[WdfDeviceResumeIdleNoTrackTableIndex])(WdfDriverGlobals, Device);
4046}
4047
4048//
4049// WDF Function: WdfDeviceStopIdleActual
4050//
4051typedef
4055WDFAPI
4057(STDCALL *PFN_WDFDEVICESTOPIDLEACTUAL)(
4058 _In_
4060 _In_
4061 WDFDEVICE Device,
4062 _In_
4064 _In_opt_
4066 _In_
4068 _In_z_
4070 );
4071
4077WdfDeviceStopIdleActual(
4078 _In_
4079 WDFDEVICE Device,
4080 _In_
4082 _In_opt_
4083 PVOID Tag,
4084 _In_
4086 _In_z_
4087 PCHAR File
4088 )
4089{
4090 return ((PFN_WDFDEVICESTOPIDLEACTUAL) WdfFunctions[WdfDeviceStopIdleActualTableIndex])(WdfDriverGlobals, Device, WaitForD0, Tag, Line, File);
4091}
4092
4093//
4094// WDF Function: WdfDeviceResumeIdleActual
4095//
4096typedef
4098WDFAPI
4099VOID
4100(STDCALL *PFN_WDFDEVICERESUMEIDLEACTUAL)(
4101 _In_
4103 _In_
4104 WDFDEVICE Device,
4105 _In_opt_
4106 PVOID Tag,
4107 _In_
4108 LONG Line,
4109 _In_z_
4110 PCHAR File
4111 );
4112
4115VOID
4116WdfDeviceResumeIdleActual(
4117 _In_
4118 WDFDEVICE Device,
4119 _In_opt_
4120 PVOID Tag,
4121 _In_
4122 LONG Line,
4123 _In_z_
4124 PCHAR File
4125 )
4126{
4128}
4129
4130//
4131// WDF Function: WdfDeviceGetFileObject
4132//
4133typedef
4135WDFAPI
4136WDFFILEOBJECT
4137(STDCALL *PFN_WDFDEVICEGETFILEOBJECT)(
4138 _In_
4140 _In_
4141 WDFDEVICE Device,
4142 _In_
4144 );
4145
4148WDFFILEOBJECT
4149WdfDeviceGetFileObject(
4150 _In_
4151 WDFDEVICE Device,
4152 _In_
4154 )
4155{
4156 return ((PFN_WDFDEVICEGETFILEOBJECT) WdfFunctions[WdfDeviceGetFileObjectTableIndex])(WdfDriverGlobals, Device, FileObject);
4157}
4158
4159//
4160// WDF Function: WdfDeviceEnqueueRequest
4161//
4162typedef
4165WDFAPI
4167(STDCALL *PFN_WDFDEVICEENQUEUEREQUEST)(
4168 _In_
4170 _In_
4171 WDFDEVICE Device,
4172 _In_
4173 WDFREQUEST Request
4174 );
4175
4180WdfDeviceEnqueueRequest(
4181 _In_
4182 WDFDEVICE Device,
4183 _In_
4184 WDFREQUEST Request
4185 )
4186{
4187 return ((PFN_WDFDEVICEENQUEUEREQUEST) WdfFunctions[WdfDeviceEnqueueRequestTableIndex])(WdfDriverGlobals, Device, Request);
4188}
4189
4190//
4191// WDF Function: WdfDeviceGetDefaultQueue
4192//
4193typedef
4195WDFAPI
4196WDFQUEUE
4197(STDCALL *PFN_WDFDEVICEGETDEFAULTQUEUE)(
4198 _In_
4200 _In_
4201 WDFDEVICE Device
4202 );
4203
4206WDFQUEUE
4207WdfDeviceGetDefaultQueue(
4208 _In_
4209 WDFDEVICE Device
4210 )
4211{
4212 return ((PFN_WDFDEVICEGETDEFAULTQUEUE) WdfFunctions[WdfDeviceGetDefaultQueueTableIndex])(WdfDriverGlobals, Device);
4213}
4214
4215//
4216// WDF Function: WdfDeviceConfigureRequestDispatching
4217//
4218typedef
4221WDFAPI
4223(STDCALL *PFN_WDFDEVICECONFIGUREREQUESTDISPATCHING)(
4224 _In_
4226 _In_
4227 WDFDEVICE Device,
4228 _In_
4229 WDFQUEUE Queue,
4230 _In_
4233 );
4234
4239WdfDeviceConfigureRequestDispatching(
4240 _In_
4241 WDFDEVICE Device,
4242 _In_
4243 WDFQUEUE Queue,
4244 _In_
4247 )
4248{
4249 return ((PFN_WDFDEVICECONFIGUREREQUESTDISPATCHING) WdfFunctions[WdfDeviceConfigureRequestDispatchingTableIndex])(WdfDriverGlobals, Device, Queue, RequestType);
4250}
4251
4252//
4253// WDF Function: WdfDeviceConfigureWdmIrpDispatchCallback
4254//
4255typedef
4258WDFAPI
4260(STDCALL *PFN_WDFDEVICECONFIGUREWDMIRPDISPATCHCALLBACK)(
4261 _In_
4263 _In_
4264 WDFDEVICE Device,
4265 _In_opt_
4266 WDFDRIVER Driver,
4267 _In_
4269 _In_
4271 _In_opt_
4273 );
4274
4279WdfDeviceConfigureWdmIrpDispatchCallback(
4280 _In_
4281 WDFDEVICE Device,
4282 _In_opt_
4283 WDFDRIVER Driver,
4284 _In_
4286 _In_
4288 _In_opt_
4290 )
4291{
4293}
4294
4295//
4296// WDF Function: WdfDeviceGetSystemPowerAction
4297//
4298typedef
4300WDFAPI
4302(STDCALL *PFN_WDFDEVICEGETSYSTEMPOWERACTION)(
4303 _In_
4305 _In_
4306 WDFDEVICE Device
4307 );
4308
4312WdfDeviceGetSystemPowerAction(
4313 _In_
4314 WDFDEVICE Device
4315 )
4316{
4317 return ((PFN_WDFDEVICEGETSYSTEMPOWERACTION) WdfFunctions[WdfDeviceGetSystemPowerActionTableIndex])(WdfDriverGlobals, Device);
4318}
4319
4320//
4321// WDF Function: WdfDeviceWdmAssignPowerFrameworkSettings
4322//
4323typedef
4326WDFAPI
4328(STDCALL *PFN_WDFDEVICEWDMASSIGNPOWERFRAMEWORKSETTINGS)(
4329 _In_
4331 _In_
4332 WDFDEVICE Device,
4333 _In_
4335 );
4336
4341WdfDeviceWdmAssignPowerFrameworkSettings(
4342 _In_
4343 WDFDEVICE Device,
4344 _In_
4346 )
4347{
4348 return ((PFN_WDFDEVICEWDMASSIGNPOWERFRAMEWORKSETTINGS) WdfFunctions[WdfDeviceWdmAssignPowerFrameworkSettingsTableIndex])(WdfDriverGlobals, Device, PowerFrameworkSettings);
4349}
4350
4351//
4352// WDF Function: WdfDeviceInitSetReleaseHardwareOrderOnFailure
4353//
4354typedef
4356WDFAPI
4357VOID
4358(STDCALL *PFN_WDFDEVICEINITSETRELEASEHARDWAREORDERONFAILURE)(
4359 _In_
4361 _In_
4363 _In_
4365 );
4366
4369VOID
4370WdfDeviceInitSetReleaseHardwareOrderOnFailure(
4371 _In_
4373 _In_
4375 )
4376{
4378}
4379
4380//
4381// WDF Function: WdfDeviceInitSetIoTypeEx
4382//
4383typedef
4385WDFAPI
4386VOID
4387(STDCALL *PFN_WDFDEVICEINITSETIOTYPEEX)(
4388 _In_
4390 _In_
4392 _In_
4394 );
4395
4398VOID
4399WdfDeviceInitSetIoTypeEx(
4400 _In_
4402 _In_
4404 )
4405{
4407}
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419//
4420// WDF Function: WdfDeviceQueryPropertyEx
4421//
4422typedef
4425WDFAPI
4427(STDCALL *PFN_WDFDEVICEQUERYPROPERTYEX)(
4428 _In_
4430 _In_
4431 WDFDEVICE Device,
4432 _In_
4434 _In_
4436 _Out_
4438 _Out_