ReactOS 0.4.15-dev-7889-g76290a6
fxresourceapi.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxResourceAPI.cpp
8
9Abstract:
10
11 This module implements the resource class.
12
13Author:
14
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24--*/
25#include "fxsupportpch.hpp"
26
27extern "C" {
28// #include "FxResourceAPI.tmh"
29}
30
31//
32// Extern "C" the entire file
33//
34extern "C" {
35
37VOID
39WDFEXPORT(WdfIoResourceRequirementsListSetSlotNumber)(
40 __in
42 __in
43 WDFIORESREQLIST RequirementsList,
44 __in
46 )
47/*++
48
49Routine Description:
50 Sets the slot number for a given resource requirements list
51
52Arguments:
53 RequirementsList - list to be modified
54
55 SlotNumber - slot value to assign
56
57Return Value:
58 None
59
60 --*/
61{
63
68
71 }
73}
74
76VOID
78WDFEXPORT(WdfIoResourceRequirementsListSetInterfaceType)(
79 __in
81 __in
82 WDFIORESREQLIST RequirementsList,
83 __in
84 __drv_strictTypeMatch(__drv_typeCond)
86 )
87/*++
88
89Routine Description:
90 Sets the InterfaceType for a given resource requirements list
91
92Arguments:
93 RequirementsList - list to be modified
94
95 InterfaceType - interface type to assign
96
97Return Value:
98 None
99
100 --*/
101{
103
107 (PVOID*) &pIoResReqList);
108
111 }
112
114}
115
119FxIoResourceRequirementsListInsertIoResList(
120 __in
122 __in
123 WDFIORESREQLIST RequirementsList,
124 __in
125 WDFIORESLIST IoResList,
127 )
128/*++
129
130Routine Description:
131 Inserts a resource list into a requirements list at a particular index.
132
133Arguments:
134 RequirementsList - list to be modified
135
136 IoResList - resource list to add
137
138 Index - zero based index to insert at
139
140Return Value:
141 NTSTATUS
142
143 --*/
144{
149
155
157 IoResList,
159 (PVOID*) &pIoResList);
160
163 }
164
166
168 //
169 // Mirror the access flags as well.
170 //
173 }
174
175 return status;
176}
177
178
183WDFEXPORT(WdfIoResourceRequirementsListInsertIoResList)(
184 __in
186 __in
187 WDFIORESREQLIST RequirementsList,
188 __in
189 WDFIORESLIST IoResList,
190 __in
192 )
193/*++
194
195Routine Description:
196 Inserts a resource list into a requirements list at a particular index.
197
198Arguments:
199 RequirementsList - list to be modified
200
201 IoResList - resource list to add
202
203 Index - zero based index to insert at
204
205Return Value:
206 NTSTATUS
207
208 --*/
209{
210 return FxIoResourceRequirementsListInsertIoResList(DriverGlobals,
212 IoResList,
213 Index);
214}
215
220WDFEXPORT(WdfIoResourceRequirementsListAppendIoResList)(
221 __in
223 __in
224 WDFIORESREQLIST RequirementsList,
225 __in
226 WDFIORESLIST IoResList
227 )
228/*++
229
230Routine Description:
231 Appends a resource list to a resource requirements list
232
233Arguments:
234 RequirementsList - list to be modified
235
236 IoResList - resource list to append
237
238Return Value:
239 NTSTATUS
240
241 --*/
242
243{
244 return FxIoResourceRequirementsListInsertIoResList(DriverGlobals,
246 IoResList,
248}
249
250
252ULONG
254WDFEXPORT(WdfIoResourceRequirementsListGetCount)(
255 __in
257 __in
258 WDFIORESREQLIST RequirementsList
259 )
260/*++
261
262Routine Description:
263 Returns the number of resource lists in the requirements list
264
265
266Arguments:
267 RequirementsList - requirements list whose count will be returned
268
269Return Value:
270 number of elements in the list
271
272 --*/
273
274{
278
282 (PVOID*) &pList);
283
284 pList->Lock(&irql);
285 count = pList->Count();
287
288 return count;
289}
290
292WDFIORESLIST
294WDFEXPORT(WdfIoResourceRequirementsListGetIoResList)(
295 __in
297 __in
298 WDFIORESREQLIST RequirementsList,
299 __in
301 )
302/*++
303
304Routine Description:
305 Retrieves a resource list from the requirements list at a given index.
306
307Arguments:
308 RequirementsList - list to retrieve the resource list from
309
310 Index - zero based index from which to retrieve the list
311
312Return Value:
313 resource list handle or NULL
314
315 --*/
316{
319 KIRQL irql;
320
324 (PVOID*) &pIoResReqList);
325
326 pIoResReqList->Lock(&irql);
329
330 if (pObject == NULL) {
331 return NULL;
332 }
333 else {
334 return (WDFIORESLIST) pObject->GetObjectHandle();
335 }
336}
337
339VOID
341WDFEXPORT(WdfIoResourceRequirementsListRemove)(
342 __in
344 __in
345 WDFIORESREQLIST RequirementsList,
346 __in
348 )
349/*++
350
351Routine Description:
352 Removes a resource list from the requirements list at a given index
353
354Arguments:
355 RequirementsList - list of resource requirements which will be modified
356
357 Index - zero based index which indictes location in the list to find the
358 resource list
359
360Return Value:
361 None
362
363 --*/
364{
367
371 (PVOID*) &pList,
373
377 "WDFIORESLIST %p, could not remove list at index %d (not found), "
378 "list item count is %d", RequirementsList, Index, pList->Count());
379
381 }
382}
383
385VOID
387WDFEXPORT(WdfIoResourceRequirementsListRemoveByIoResList)(
388 __in
390 __in
391 WDFIORESREQLIST RequirementsList,
392 __in
393 WDFIORESLIST IoResList
394 )
395/*++
396
397Routine Description:
398 Removes a resource list from the requirements list based on the resource list's
399 handle
400
401Arguments:
402 RequirementsList - resource requirements list being modified
403
404 IoResList - resource list to be removed
405
406Return Value:
407 None
408
409 --*/
410{
415 KIRQL irql;
417
421 (PVOID*) &pList,
423
426 "WDFIORESREQLIST %p: Removes not allowed",
428
430 return;
431 }
432
434 IoResList,
436 (PVOID*) &pResList);
437
438 pList->Lock(&irql);
439
440 cur = pList->Start();
441 end = pList->End();
443
444 while (cur != end) {
445 if (cur->m_Object == pResList) {
447
449 listFound = TRUE;
450 break;
451 }
452
453 cur = cur->Next();
454 }
455
456 pList->Unlock(irql);
457
460 pResList = NULL;
461 }
462}
463
468WDFEXPORT(WdfIoResourceListCreate)(
469 __in
471 __in
472 WDFIORESREQLIST RequirementsList,
475 __out
476 WDFIORESLIST* ResourceList
477 )
478/*++
479
480Routine Description:
481 Creates a resource list.
482
483Arguments:
484 RequirementsList - the resource requirements list that the resource list will
485 be associated with
486
487 Attributes - generic object attributes for the new resource list
488
489 ResourceList - pointer which will receive the new object handle
490
491Return Value:
492 NTSTATUS
493
494 --*/
495{
500
506
509
513
515 return status;
516 }
517
520
521 if (pIoResList == NULL) {
523 }
524
528
529 if (!NT_SUCCESS(status)) {
531 }
532
533 return status;
534}
535
539FxIoResourceListInsertDescriptor(
540 __in
542 __in
543 WDFIORESLIST ResourceList,
544 __in
547 )
548/*++
549
550Routine Description:
551 Inserts a descriptor into a resource list at a particular index.
552
553Arguments:
554 ResourceList - list to be modified
555
556 Descriptor - descriptor to insert
557
558 Index - zero based index to insert at
559
560Return Value:
561 NTSTATUS
562
563 --*/
564{
569
573 (PVOID*) &pList,
575
577
578 if (pList->m_OwningList->IsAddAllowed() == FALSE) {
580 "Removes not allowed on WDFIORESLIST %p",
584 }
585
588
589 if (pObject == NULL) {
591 }
592
594 if (!NT_SUCCESS(status)) {
596 return status;
597 }
598
600
601 //
602 // Mark both this list and its owning list as changed so when it comes
603 // time to evaluate the entire requirements list for changes, we do not
604 // have to iterate over all the resource lists.
605 //
606 if (NT_SUCCESS(status)) {
607 pList->m_OwningList->MarkChanged();
608 }
609
610 return status;
611}
612
617WDFEXPORT(WdfIoResourceListInsertDescriptor)(
618 __in
620 __in
621 WDFIORESLIST ResourceList,
622 __in
624 __in
626 )
627/*++
628
629Routine Description:
630 Inserts a descriptor into a resource list at a particular index.
631
632Arguments:
633 ResourceList - list to be modified
634
635 Descriptor - descriptor to insert
636
637 Index - zero based index to insert at
638
639Return Value:
640 NTSTATUS
641
642 --*/
643{
644 return FxIoResourceListInsertDescriptor(DriverGlobals,
647 Index);
648}
649
654WDFEXPORT(WdfIoResourceListAppendDescriptor)(
655 __in
657 __in
658 WDFIORESLIST ResourceList,
659 __in
661 )
662/*++
663
664Routine Description:
665 Appends a descriptor to a resource list
666
667Arguments:
668 ResourceList - list to be modified
669
670 Descriptor - item to be appended
671
672Return Value:
673 NTSTATUS
674
675 --*/
676{
677 return FxIoResourceListInsertDescriptor(DriverGlobals,
681}
682
684VOID
686WDFEXPORT(WdfIoResourceListUpdateDescriptor)(
687 __in
689 __in
690 WDFIORESLIST ResourceList,
691 __in
693 __in
695 )
696/*++
697
698Routine Description:
699 Updates resource requirement in place in the list.
700
701Arguments:
702 ResourceList - list to be modified
703
704 Descriptor - Pointer to descriptor whic contains the updated value
705
706 Index - zero based location in the list to update
707
708Return Value:
709 None
710
711 --*/
712{
716 KIRQL irql;
717
721 (PVOID*) &pList,
723
725
726 pList->Lock(&irql);
728 pList->Unlock(irql);
729
730 if (pObject != NULL) {
731 //
732 // We don't check for add or remove access because we don't know what
733 // the update is actually doing (ie widening a range, shortening it, etc).
734 // For this operation we have to trust the driver that it is doing the
735 // right thing at the right time.
736 //
737 RtlCopyMemory(&pObject->m_Descriptor,
739 sizeof(pObject->m_Descriptor));
740
741 //
742 // Mark both this list and its owning list as changed so when it comes
743 // time to evaluate the entire requirements list for changes, we do not
744 // have to iterate over all the resource lists.
745 //
747 pList->m_OwningList->MarkChanged();
748 }
749 else {
752 "WDFIORESREQLIST %p, cannot update item at index %d, item not found,"
753 " list item count is %d", ResourceList, Index, pList->Count());
754
756 }
757}
758
760ULONG
762WDFEXPORT(WdfIoResourceListGetCount)(
763 __in
765 __in
766 WDFIORESLIST ResourceList
767 )
768/*++
769
770Routine Description:
771 Returns the number of descriptors in the resource list
772
773Arguments:
774 ResourceList - resource list whose count will be returned
775
776Return Value:
777 number of elements in the list
778
779 --*/
780{
782 ULONG count;
783 KIRQL irql;
784
788 (PVOID*) &pList);
789
790 pList->Lock(&irql);
791 count = pList->Count();
792 pList->Unlock(irql);
793
794 return count;
795}
796
797
801WDFEXPORT(WdfIoResourceListGetDescriptor)(
802 __in
804 __in
805 WDFIORESLIST ResourceList,
806 __in
808 )
809/*++
810
811Routine Description:
812 Retrieves an io resource desciptor for a given index in the resource list
813
814Arguments:
815 ResourceList - list being looked up
816
817 Index - zero based index into the list to find the value of
818
819Return Value:
820 pointer to an io resource descriptor upon success, NULL upon error
821
822 --*/
823
824{
827 KIRQL irql;
828
832 (PVOID*) &pList);
833
834 pList->Lock(&irql);
836 pList->Unlock(irql);
837
838 if (pObject == NULL) {
839 return NULL;
840 }
841 else {
842 //
843 // Copy the current descriptor to the clone and return it
844 //
845 RtlCopyMemory(&pObject->m_DescriptorClone,
846 &pObject->m_Descriptor,
847 sizeof(pObject->m_Descriptor));
848
849 return &pObject->m_DescriptorClone;
850 }
851}
852
854VOID
856WDFEXPORT(WdfIoResourceListRemove)(
857 __in
859 __in
860 WDFIORESLIST ResourceList,
861 __in
863 )
864/*++
865
866Routine Description:
867 Removes a descriptor in an io resource list
868
869Arguments:
870 ResourceList - resource list to modify
871
872 Index - zero based index into the list in which to remove the descriptor
873
874Return Value:
875 None
876
877 --*/
878{
881
885 (PVOID*) &pList,
887
889 //
890 // Mark this list's owning list as changed so when it comes
891 // time to evaluate the entire requirements list for changes, we do not
892 // have to iterate over all the resource lists.
893 //
894 // RemoveAndDelete marked pList as changed already
895 //
896 pList->m_OwningList->MarkChanged();
897 }
898 else {
901 "WDFIORESLIST %p, could not remove item at index %d (not found), "
902 "list item count is %d", ResourceList, Index, pList->Count());
903
905 }
906}
907
909VOID
911WDFEXPORT(WdfIoResourceListRemoveByDescriptor)(
912 __in
914 __in
915 WDFIORESLIST ResourceList,
916 __in
918 )
919/*++
920
921Routine Description:
922 Removes a descriptor by value in a given io resource list. Equality is
923 determined by RtlCompareMemory.
924
925Arguments:
926 ResourceList - the io resource list to modify
927
928 Descriptor - pointer to a descriptor to remove.
929
930Return Value:
931 None
932
933 --*/
934{
939 KIRQL irql;
940
944 (PVOID*) &pList,
946
948
949 if (pList->IsRemoveAllowed() == FALSE) {
951 "Removes not allowed on WDFIORESLIST %p",
953
955 return;
956 }
957
958 pList->Lock(&irql);
959
960 cur = pList->Start();
961 end = pList->End();
962 pObject = NULL;
963
964 while (cur != end) {
966
967 if (RtlCompareMemory(&pObject->m_Descriptor,
969 sizeof(*Descriptor)) == sizeof(*Descriptor)) {
970 //
971 // Mark both this list and its owning list as changed so when it
972 // comes time to evaluate the entire requirements list for
973 // changes, we do not have to iterate over all the resource lists.
974 //
976 pList->m_OwningList->MarkChanged();
977
979 break;
980 }
981
982 //
983 // Set to NULL so that we do not delete it if this is the last item in
984 // the list.
985 //
986 pObject = NULL;
987
988 cur = cur->Next();
989 }
990
991 pList->Unlock(irql);
992
993 if (pObject != NULL) {
995 }
996}
997
1002 __in
1004 __in
1005 WDFCMRESLIST List,
1006 __in
1008 __in
1009 ULONG Index
1010 )
1011/*++
1012
1013Routine Description:
1014 Inserts a descriptor into a cm resource list at a particular index.
1015
1016Arguments:
1017 ResourceList - list to be modified
1018
1019 Descriptor - descriptor to insert
1020
1021 Index - zero based index to insert at
1022
1023Return Value:
1024 NTSTATUS
1025
1026 --*/
1027{
1032
1034
1036
1038 List,
1040 (PVOID*) &pList);
1041
1043
1044 if (pObject == NULL) {
1046 }
1047
1049 if (!NT_SUCCESS(status)) {
1051 return status;
1052 }
1053
1055}
1056
1060STDCALL
1061WDFEXPORT(WdfCmResourceListInsertDescriptor)(
1062 __in
1064 __in
1065 WDFCMRESLIST List,
1066 __in
1068 __in
1069 ULONG Index
1070 )
1071/*++
1072
1073Routine Description:
1074 Inserts a descriptor into a cm resource list at a particular index.
1075
1076Arguments:
1077 ResourceList - list to be modified
1078
1079 Descriptor - descriptor to insert
1080
1081 Index - zero based index to insert at
1082
1083Return Value:
1084 NTSTATUS
1085
1086 --*/
1087{
1088 DDI_ENTRY();
1089
1091 List,
1092 Descriptor,
1093 Index);
1094}
1095
1099STDCALL
1100WDFEXPORT(WdfCmResourceListAppendDescriptor)(
1101 __in
1103 __in
1104 WDFCMRESLIST List,
1105 __in
1107 )
1108/*++
1109
1110Routine Description:
1111 Appends a descriptor to a cm resource list
1112
1113Arguments:
1114 ResourceList - list to be modified
1115
1116 Descriptor - item to be appended
1117
1118Return Value:
1119 NTSTATUS
1120
1121 --*/
1122{
1123 DDI_ENTRY();
1124
1126 List,
1127 Descriptor,
1129}
1130
1132ULONG
1133STDCALL
1134WDFEXPORT(WdfCmResourceListGetCount)(
1135 __in
1137 __in
1138 WDFCMRESLIST List
1139 )
1140/*++
1141
1142Routine Description:
1143 Returns the number of cm descriptors in the resource list
1144
1145Arguments:
1146 ResourceList - resource list whose count will be returned
1147
1148Return Value:
1149 number of elements in the list
1150
1151 --*/
1152{
1154
1156 List,
1158 (PVOID*) &pList);
1159
1160 return pList->GetCount();
1161}
1162
1163
1166STDCALL
1167WDFEXPORT(WdfCmResourceListGetDescriptor)(
1168 __in
1170 __in
1171 WDFCMRESLIST List,
1172 __in
1173 ULONG Index
1174 )
1175/*++
1176
1177Routine Description:
1178 Retrieves a cm resource desciptor for a given index in the resource list
1179
1180Arguments:
1181 ResourceList - list being looked up
1182
1183 Index - zero based index into the list to find the value of
1184
1185Return Value:
1186 pointer to a cm resource descriptor upon success, NULL upon error
1187
1188 --*/
1189{
1190 DDI_ENTRY();
1191
1193
1195 List,
1197 (PVOID*) &pList);
1198
1199 return pList->GetDescriptor(Index);
1200}
1201
1203VOID
1204STDCALL
1205WDFEXPORT(WdfCmResourceListRemove)(
1206 __in
1208 __in
1209 WDFCMRESLIST List,
1210 __in
1211 ULONG Index
1212 )
1213/*++
1214
1215Routine Description:
1216 Removes a descriptor in an cm resource list
1217
1218Arguments:
1219 ResourceList - resource list to modify
1220
1221 Index - zero based index into the list in which to remove the descriptor
1222
1223Return Value:
1224 None
1225
1226 --*/
1227{
1228 DDI_ENTRY();
1229
1232
1234 List,
1236 (PVOID*) &pList,
1238
1239 if (pList->RemoveAndDelete(Index) == FALSE) {
1242 "WDFCMRESLIST %p, could not remove list at index %d (not found), "
1243 "list item count is %d", List, Index, pList->Count());
1244
1246 }
1247}
1248
1250VOID
1251STDCALL
1252WDFEXPORT(WdfCmResourceListRemoveByDescriptor)(
1253 __in
1255 __in
1256 WDFCMRESLIST List,
1257 __in
1259 )
1260/*++
1261
1262Routine Description:
1263 Removes a descriptor by value in a given cm resource list. Equality is
1264 determined by RtlCompareMemory.
1265
1266Arguments:
1267 ResourceList - the io resource list to modify
1268
1269 Descriptor - pointer to a descriptor to remove.
1270
1271Return Value:
1272 None
1273
1274 --*/
1275{
1276 DDI_ENTRY();
1277
1283 KIRQL irql;
1284
1286 List,
1288 (PVOID*) &pList,
1290
1292
1293 if (pList->IsRemoveAllowed() == FALSE) {
1295 "Removes not allowed on WDFCMRESLIST %p", List);
1296
1298 return;
1299 }
1300
1301 pList->Lock(&irql);
1302
1303 cur = pList->Start();
1304 end = pList->End();
1305 pObject = NULL;
1306
1307 while (cur != end) {
1309
1310 if (RtlCompareMemory(&pObject->m_Descriptor,
1311 Descriptor,
1312 sizeof(*Descriptor)) == sizeof(*Descriptor)) {
1313 pList->MarkChanged();
1314
1316 break;
1317 }
1318
1319 //
1320 // Set to NULL so that we do not delete it if this is the last item in
1321 // the list.
1322 //
1323 pObject = NULL;
1324
1325 cur = cur->Next();
1326 }
1327
1328 pList->Unlock(irql);
1329
1330 if (pObject != NULL) {
1332 pObject = NULL;
1333 }
1334}
1335
1336} // extern "C"
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
FxObject * m_Object
FxCollectionEntry * Next(VOID)
FxIoResReqList * m_OwningList
Definition: fxresource.hpp:746
INTERFACE_TYPE m_InterfaceType
Definition: fxresource.hpp:716
_Must_inspect_result_ NTSTATUS AssignParentObject(__in FxObject *ParentObject)
Definition: fxobject.cpp:529
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603
virtual VOID DeleteObject(VOID)
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
BOOLEAN IsRemoveAllowed(VOID)
Definition: fxresource.hpp:311
BOOLEAN RemoveAndDelete(__in ULONG Index)
BOOLEAN IsAddAllowed(VOID)
Definition: fxresource.hpp:319
_Must_inspect_result_ NTSTATUS AddAt(__in ULONG Index, __in FxObject *Object)
VOID MarkChanged(VOID)
Definition: fxresource.hpp:327
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define TRACINGPNP
Definition: dbgtrace.h:67
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define __drv_maxIRQL(irql)
Definition: driverspecs.h:291
#define __drv_strictTypeMatch(mode)
Definition: driverspecs.h:330
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
DriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
#define DDI_ENTRY()
Definition: fxglobalskm.h:56
#define WDFEXPORT(a)
Definition: fxmacros.hpp:157
#define FxPointerNotNull(FxDriverGlobals, Ptr)
Definition: fxmacros.hpp:253
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), RequirementsList, FX_TYPE_IO_RES_REQ_LIST,(PVOID *) &pIoResReqList)
NTSTATUS status
_Must_inspect_result_ __in WDFCMRESLIST List
_Must_inspect_result_ __in WDFIORESREQLIST __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFIORESLIST * ResourceList
__in WDFIORESREQLIST __in ULONG SlotNumber
_Must_inspect_result_ __in WDFIORESREQLIST __in WDFIORESLIST IoResList
__in WDFIORESREQLIST RequirementsList
FxObject * pObject
FxVerifierDbgBreakPoint(pFxDriverGlobals)
FxCollectionEntry * cur
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), RequirementsList, FX_TYPE_IO_RES_REQ_LIST,(PVOID *) &pIoResReqList, &pFxDriverGlobals)
_Must_inspect_result_ __in WDFIORESLIST __in PIO_RESOURCE_DESCRIPTOR Descriptor
FxIoResList * pIoResList
KIRQL irql
_Must_inspect_result_ __in WDFIORESREQLIST __in_opt PWDF_OBJECT_ATTRIBUTES Attributes
return FxCmResourceListInsertDescriptor(DriverGlobals, List, Descriptor, Index)
FxIoResReqList * pList
ULONG count
BOOLEAN listFound
FxIoResList * pResList
_Must_inspect_result_ __in WDFIORESREQLIST __in WDFIORESLIST ULONG Index
FxCollectionEntry * end
FxIoResReqList * pIoResReqList
pFxDriverGlobals
@ FX_TYPE_IO_RES_REQ_LIST
Definition: fxtypes.h:90
@ FX_TYPE_IO_RES_LIST
Definition: fxtypes.h:88
@ FX_TYPE_CM_RES_LIST
Definition: fxtypes.h:89
@ FX_VALIDATE_OPTION_PARENT_NOT_ALLOWED
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
GLuint GLuint end
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
enum _INTERFACE_TYPE INTERFACE_TYPE
if(dx< 0)
Definition: linetemp.h:194
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_Must_inspect_result_ FxCollectionEntry * Start(VOID)
NTSTATUS RemoveEntry(__in FxCollectionEntry *Entry)
_Must_inspect_result_ FxObject * GetItem(__in ULONG Index)
_Must_inspect_result_ FxCollectionEntry * End(VOID)
Definition: ps.c:97
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define STDCALL
Definition: wdf.h:45
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_ WDFIORESLIST IoResList
Definition: wdfresource.h:129
_In_ WDFIORESREQLIST RequirementsList
Definition: wdfresource.h:65
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:68
#define WDF_INSERT_AT_END
Definition: wdfresource.h:50